void FlightPathMovementGenerator::Initialize(Player &player) { player.getHostileRefManager().setOnlineOfflineState(false); player.AddUnitState(UNIT_STAT_IN_FLIGHT); player.SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT); Traveller<Player> traveller(player); // do not send movement, it was sent already i_destinationHolder.SetDestination(traveller, (*i_path)[i_currentNode].x, (*i_path)[i_currentNode].y, (*i_path)[i_currentNode].z, false); // For preloading end grid InitEndGridInfo(); player.SendMonsterMoveByPath(GetPath(), GetCurrentNode(), GetPathAtMapEnd()); }
void FollowMovementGenerator<Player>::Initialize(Player &owner) { owner.AddUnitState(UNIT_STAT_FOLLOW|UNIT_STAT_FOLLOW_MOVE); _updateSpeed(owner); _setTargetLocation(owner); }
void ChaseMovementGenerator<Player>::Initialize(Player &owner) { owner.AddUnitState(UNIT_STAT_CHASE|UNIT_STAT_CHASE_MOVE); _setTargetLocation(owner); }