From: Borrillis <bor...@us...> - 2006-11-13 21:37:11
|
Update of /cvsroot/planeshift/planeshift/src/server/bulkobjects In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19183/src/server/bulkobjects Modified Files: psspell.cpp Log Message: - Fix for killstealing from magic users : a successful cast now adds the attacker to the DamageHistory of the target. [Bug #183] Index: psspell.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/server/bulkobjects/psspell.cpp,v retrieving revision 1.99 retrieving revision 1.100 diff -C2 -d -r1.99 -r1.100 *** psspell.cpp 9 Nov 2006 22:02:56 -0000 1.99 --- psspell.cpp 13 Nov 2006 21:37:09 -0000 1.100 *************** *** 710,713 **** --- 710,715 ---- bool psSpell::PerformResult(gemActor *caster, gemObject *target, float min_range, float max_range, bool saved, float powerLevel) const { + float result = 0; + switch ( checkRange(caster,target, min_range, max_range) ) { *************** *** 749,756 **** progEvent->CopyVariables(mathScript); ! if ( progEvent->Run(caster,target,psserver->GetProgressionManager() ) ) ! { ! return false; ! } } else --- 751,755 ---- progEvent->CopyVariables(mathScript); ! result = progEvent->Run(caster,target,psserver->GetProgressionManager()); } else *************** *** 761,764 **** --- 760,769 ---- } + gemActor *attackee = dynamic_cast<gemActor*>(target); + if ( attackee ) + { + attackee->AddAttackerHistory( caster, result ); + } + // Spell hit successfully. Now let npcclient's know about it. psserver->GetNPCManager()->QueueSpellPerception(caster,target,npcSpellCategory,npcSpellCategoryID,npcSpellRelativePower); |