aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-05-02 13:30:55 -0500
committermegamage <none@none>2009-05-02 13:30:55 -0500
commit9f0f239e60e2c7f0b8d36d1984f459102022164e (patch)
tree45e7629371e903fdd429a1bf449c9c53bf46d9ec /src/game/Unit.cpp
parent8a05a5b91cf884c87c9ada5b0bd0ab872a3167e0 (diff)
parentf303ee08c5888170ad1509b89413af1e2a321f5c (diff)
*Merge.
*Also fix build in VC7 and VC8. --HG-- branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp8
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;
}