Changeset 140 for trunk/src/game/Unit.cpp
- Timestamp:
- 11/19/08 13:39:45 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/game/Unit.cpp
r139 r140 520 520 return damage; 521 521 } 522 523 if(!pVictim->isInCombat() && ((Creature*)pVictim)->AI())524 ((Creature*)pVictim)->AI()->AttackStart(this);525 522 } 526 523 … … 539 536 540 537 duel_hasEnded = true; 541 }542 //Get in CombatState543 if(pVictim != this && damagetype != DOT)544 {545 SetInCombatWith(pVictim);546 pVictim->SetInCombatWith(this);547 548 if(Player* attackedPlayer = pVictim->GetCharmerOrOwnerPlayerOrPlayerItself())549 SetContestedPvP(attackedPlayer);550 538 } 551 539 … … 2151 2139 if(IsNonMeleeSpellCasted(false)) 2152 2140 return; 2141 2142 if(!pVictim->isInCombat() && pVictim->GetTypeId() != TYPEID_PLAYER && ((Creature*)pVictim)->AI()) 2143 ((Creature*)pVictim)->AI()->AttackStart(this); 2144 2145 SetInCombatWith(pVictim); 2146 pVictim->SetInCombatWith(this); 2147 2148 if(Player* attackedPlayer = pVictim->GetCharmerOrOwnerPlayerOrPlayerItself()) 2149 SetContestedPvP(attackedPlayer); 2153 2150 2154 2151 uint32 hitInfo;