diff options
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r-- | src/game/Unit.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 458fb466cef..3142e742dcf 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -289,6 +289,8 @@ void Unit::SendMonsterStop() data << getMSTime(); data << uint8(1); SendMessageToSet(&data, true); + + clearUnitState(UNIT_STAT_MOVE); } void Unit::SendMonsterMove(float NewPosX, float NewPosY, float NewPosZ, uint32 Time, Player* player) @@ -310,6 +312,8 @@ void Unit::SendMonsterMove(float NewPosX, float NewPosY, float NewPosZ, uint32 T player->GetSession()->SendPacket(&data); else SendMessageToSet( &data, true ); + + addUnitState(UNIT_STAT_MOVE); } void Unit::SendMonsterMove(float NewPosX, float NewPosY, float NewPosZ, uint32 MoveFlags, uint32 time, float speedZ, Player *player) @@ -399,6 +403,8 @@ void Unit::SendMonsterMoveByPath(Path const& path, uint32 start, uint32 end) data << uint32( pathSize ); data.append( (char*)path.GetNodes(start), pathSize * 4 * 3 ); SendMessageToSet(&data, true); + + addUnitState(UNIT_STAT_MOVE); } void Unit::resetAttackTimer(WeaponAttackType type) @@ -11533,7 +11539,7 @@ void CharmInfo::InitCharmCreateSpells() if(!spellInfo) onlyselfcast = false; for(uint32 i = 0;i<3 && onlyselfcast;++i) //non existent spell will not make any problems as onlyselfcast would be false -> break right away { - if(spellInfo->EffectImplicitTargetA[i] != TARGET_SELF && spellInfo->EffectImplicitTargetA[i] != 0) + if(spellInfo->EffectImplicitTargetA[i] != TARGET_UNIT_CASTER && spellInfo->EffectImplicitTargetA[i] != 0) onlyselfcast = false; } |