Merge pull request #5933 from GyxTom/master
Core/Misc: Code style and remove unused define
This commit is contained in:
@@ -795,7 +795,7 @@ void AuctionHouseMgr::DeleteExpiredAuctionsAtStartup()
|
||||
|
||||
AuctionEntry* auction = new AuctionEntry();
|
||||
|
||||
// Can't use LoadFromDB() because it assumes the auction map is loaded
|
||||
// Can't use LoadFromDB() because it assumes the auction map is loaded
|
||||
if (!auction->LoadFromFieldList(fields))
|
||||
{
|
||||
// For some reason the record in the DB is broken (possibly corrupt
|
||||
|
||||
@@ -306,11 +306,13 @@ void ArenaTeam::DelMember(uint64 guid, bool cleanDb)
|
||||
{
|
||||
// Remove member from team
|
||||
for (MemberList::iterator itr = Members.begin(); itr != Members.end(); ++itr)
|
||||
{
|
||||
if (itr->Guid == guid)
|
||||
{
|
||||
Members.erase(itr);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Inform player and remove arena team info from player data
|
||||
if (Player* player = ObjectAccessor::FindPlayer(guid))
|
||||
|
||||
@@ -75,9 +75,9 @@ void ObjectPosSelector::InitializeAngle()
|
||||
|
||||
bool ObjectPosSelector::FirstAngle(float& angle)
|
||||
{
|
||||
if (m_UsedPosLists[USED_POS_PLUS].empty() && !m_UsedPosLists[USED_POS_MINUS].empty() )
|
||||
if (m_UsedPosLists[USED_POS_PLUS].empty() && !m_UsedPosLists[USED_POS_MINUS].empty())
|
||||
return NextAngleFor(*m_UsedPosLists[USED_POS_MINUS].begin(), 1.0f, USED_POS_PLUS, angle);
|
||||
else if (m_UsedPosLists[USED_POS_MINUS].empty() && !m_UsedPosLists[USED_POS_PLUS].empty() )
|
||||
else if (m_UsedPosLists[USED_POS_MINUS].empty() && !m_UsedPosLists[USED_POS_PLUS].empty())
|
||||
return NextAngleFor(*m_UsedPosLists[USED_POS_PLUS].begin(), -1.0f, USED_POS_MINUS, angle);
|
||||
|
||||
return false;
|
||||
@@ -100,7 +100,7 @@ bool ObjectPosSelector::NextAngle(float& angle)
|
||||
bool ObjectPosSelector::NextUsedAngle(float& angle)
|
||||
{
|
||||
while (m_nextUsedPos[USED_POS_PLUS]!=m_UsedPosLists[USED_POS_PLUS].end() ||
|
||||
m_nextUsedPos[USED_POS_MINUS]!=m_UsedPosLists[USED_POS_MINUS].end() )
|
||||
m_nextUsedPos[USED_POS_MINUS]!=m_UsedPosLists[USED_POS_MINUS].end())
|
||||
{
|
||||
// calculate next possible angle
|
||||
if (!NextPosibleAngle(angle))
|
||||
@@ -114,7 +114,7 @@ bool ObjectPosSelector::NextPosibleAngle(float& angle)
|
||||
{
|
||||
// ++ direction less updated
|
||||
if (m_nextUsedPos[USED_POS_PLUS]!=m_UsedPosLists[USED_POS_PLUS].end() &&
|
||||
(m_nextUsedPos[USED_POS_MINUS]==m_UsedPosLists[USED_POS_MINUS].end() || m_nextUsedPos[USED_POS_PLUS]->first <= m_nextUsedPos[USED_POS_MINUS]->first) )
|
||||
(m_nextUsedPos[USED_POS_MINUS]==m_UsedPosLists[USED_POS_MINUS].end() || m_nextUsedPos[USED_POS_PLUS]->first <= m_nextUsedPos[USED_POS_MINUS]->first))
|
||||
{
|
||||
bool ok;
|
||||
if (m_smallStepOk[USED_POS_PLUS])
|
||||
|
||||
@@ -20475,7 +20475,7 @@ void Player::SendProficiency(ItemClass itemClass, uint32 itemSubclassMask)
|
||||
{
|
||||
WorldPacket data(SMSG_SET_PROFICIENCY, 1 + 4);
|
||||
data << uint8(itemClass) << uint32(itemSubclassMask);
|
||||
GetSession()->SendPacket (&data);
|
||||
GetSession()->SendPacket(&data);
|
||||
}
|
||||
|
||||
void Player::RemovePetitionsAndSigns(uint64 guid, uint32 type)
|
||||
|
||||
@@ -9020,10 +9020,10 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
|
||||
case 70893:
|
||||
{
|
||||
// check if we're doing a critical hit
|
||||
if (!(procSpell->SpellFamilyFlags[1] & 0x10000000) && (procEx != PROC_EX_CRITICAL_HIT) )
|
||||
if (!(procSpell->SpellFamilyFlags[1] & 0x10000000) && (procEx != PROC_EX_CRITICAL_HIT))
|
||||
return false;
|
||||
// check if we're procced by Claw, Bite or Smack (need to use the spell icon ID to detect it)
|
||||
if (!(procSpell->SpellIconID == 262 || procSpell->SpellIconID == 1680 || procSpell->SpellIconID == 473 ))
|
||||
if (!(procSpell->SpellIconID == 262 || procSpell->SpellIconID == 1680 || procSpell->SpellIconID == 473))
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -756,7 +756,7 @@ void Group::SendLootStartRollToPlayer(uint32 countDown, uint32 mapId, Player* p,
|
||||
if (!p || !p->GetSession())
|
||||
return;
|
||||
|
||||
WorldPacket data(SMSG_LOOT_START_ROLL, (8 + 4 + 4 + 4 + 4 + 4 + 4 + 1 ));
|
||||
WorldPacket data(SMSG_LOOT_START_ROLL, (8 + 4 + 4 + 4 + 4 + 4 + 4 + 1));
|
||||
data << uint64(r.itemGUID); // guid of rolled item
|
||||
data << uint32(mapId); // 3.3.3 mapid
|
||||
data << uint32(r.totalPlayersRolling); // maybe the number of players rolling for it???
|
||||
|
||||
@@ -1673,7 +1673,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data)
|
||||
{
|
||||
WorldPacket data(SMSG_CHAR_FACTION_CHANGE, 1);
|
||||
data << uint8(CHAR_NAME_RESERVED);
|
||||
SendPacket (&data);
|
||||
SendPacket(&data);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -173,12 +173,6 @@ void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket)
|
||||
}
|
||||
}
|
||||
|
||||
#define OPEN_CHEST 11437
|
||||
#define OPEN_SAFE 11535
|
||||
#define OPEN_CAGE 11792
|
||||
#define OPEN_BOOTY_CHEST 5107
|
||||
#define OPEN_STRONGBOX 8517
|
||||
|
||||
void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket)
|
||||
{
|
||||
sLog->outDetail("WORLD: CMSG_OPEN_ITEM packet, data length = %i", (uint32)recvPacket.size());
|
||||
|
||||
@@ -2355,7 +2355,7 @@ bool InstanceMap::CanEnter(Player* player)
|
||||
return false;
|
||||
}
|
||||
// player inside instance has no group or his groups is different to entering player's one, deny entry
|
||||
if (!iPlayer->GetGroup() || iPlayer->GetGroup() != player->GetGroup() )
|
||||
if (!iPlayer->GetGroup() || iPlayer->GetGroup() != player->GetGroup())
|
||||
{
|
||||
player->SendTransferAborted(GetId(), TRANSFER_ABORT_MAX_PLAYERS);
|
||||
return false;
|
||||
|
||||
@@ -202,11 +202,11 @@ void MotionMaster::MoveTargetedHome()
|
||||
}
|
||||
else if (_owner->GetTypeId()==TYPEID_UNIT && ((Creature*)_owner)->GetCharmerOrOwnerGUID())
|
||||
{
|
||||
sLog->outStaticDebug("Pet or controlled creature (Entry: %u GUID: %u) targeting home", _owner->GetEntry(), _owner->GetGUIDLow() );
|
||||
sLog->outStaticDebug("Pet or controlled creature (Entry: %u GUID: %u) targeting home", _owner->GetEntry(), _owner->GetGUIDLow());
|
||||
Unit *target = ((Creature*)_owner)->GetCharmerOrOwner();
|
||||
if (target)
|
||||
{
|
||||
sLog->outStaticDebug("Following %s (GUID: %u)", target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature", target->GetTypeId() == TYPEID_PLAYER ? target->GetGUIDLow() : ((Creature*)target)->GetDBTableGUIDLow() );
|
||||
sLog->outStaticDebug("Following %s (GUID: %u)", target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature", target->GetTypeId() == TYPEID_PLAYER ? target->GetGUIDLow() : ((Creature*)target)->GetDBTableGUIDLow());
|
||||
Mutate(new FollowMovementGenerator<Creature>(*target,PET_FOLLOW_DIST,PET_FOLLOW_ANGLE), MOTION_SLOT_ACTIVE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ bool ConfusedMovementGenerator<T>::Update(T &unit, const uint32 &diff)
|
||||
{
|
||||
// waiting for next move
|
||||
i_nextMoveTime.Update(diff);
|
||||
if(i_nextMoveTime.Passed() )
|
||||
if (i_nextMoveTime.Passed())
|
||||
{
|
||||
// start moving
|
||||
unit.AddUnitState(UNIT_STATE_CONFUSED_MOVE);
|
||||
|
||||
@@ -182,7 +182,7 @@ FleeingMovementGenerator<T>::_getPoint(T &owner, float &x, float &y, float &z)
|
||||
}
|
||||
}
|
||||
i_to_distance_from_caster = 0.0f;
|
||||
i_nextCheckTime.Reset( urand(500,1000) );
|
||||
i_nextCheckTime.Reset(urand(500,1000));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -201,12 +201,12 @@ FleeingMovementGenerator<T>::_setMoveData(T &owner)
|
||||
(i_last_distance_from_caster < i_to_distance_from_caster && cur_dist_xyz > i_to_distance_from_caster) ||
|
||||
// if we reach bigger distance
|
||||
(cur_dist_xyz > MAX_QUIET_DISTANCE) || // if we are too far
|
||||
(i_last_distance_from_caster > MIN_QUIET_DISTANCE && cur_dist_xyz < MIN_QUIET_DISTANCE) )
|
||||
(i_last_distance_from_caster > MIN_QUIET_DISTANCE && cur_dist_xyz < MIN_QUIET_DISTANCE))
|
||||
// if we leave 'quiet zone'
|
||||
{
|
||||
// we are very far or too close, stopping
|
||||
i_to_distance_from_caster = 0.0f;
|
||||
i_nextCheckTime.Reset( urand(500,1000) );
|
||||
i_nextCheckTime.Reset(urand(500,1000));
|
||||
return false;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -231,7 +231,7 @@ void FlightPathMovementGenerator::Reset(Player & player)
|
||||
uint32 end = GetPathAtMapEnd();
|
||||
for (uint32 i = GetCurrentNode(); i != end; ++i)
|
||||
{
|
||||
G3D::Vector3 vertice((*i_path)[i].x,(*i_path)[i].y,(*i_path)[i].z);
|
||||
G3D::Vector3 vertice((*i_path)[i].x, (*i_path)[i].y, (*i_path)[i].z);
|
||||
init.Path().push_back(vertice);
|
||||
}
|
||||
init.SetFirstPointId(GetCurrentNode());
|
||||
|
||||
@@ -34,6 +34,7 @@ WorldLog::~WorldLog()
|
||||
{
|
||||
if (i_file != NULL)
|
||||
fclose(i_file);
|
||||
|
||||
i_file = NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -195,7 +195,7 @@ void WorldSession::SendPacket(WorldPacket const* packet)
|
||||
}
|
||||
#endif // !TRINITY_DEBUG
|
||||
|
||||
if (m_Socket->SendPacket (*packet) == -1)
|
||||
if (m_Socket->SendPacket(*packet) == -1)
|
||||
m_Socket->CloseSocket();
|
||||
}
|
||||
|
||||
@@ -922,6 +922,7 @@ void WorldSession::ReadAddonsInfo(WorldPacket &data)
|
||||
{
|
||||
if (data.rpos() + 4 > data.size())
|
||||
return;
|
||||
|
||||
uint32 size;
|
||||
data >> size;
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ const std::string& WorldSocket::GetRemoteAddress (void) const
|
||||
return m_Address;
|
||||
}
|
||||
|
||||
int WorldSocket::SendPacket (const WorldPacket& pct)
|
||||
int WorldSocket::SendPacket(const WorldPacket& pct)
|
||||
{
|
||||
ACE_GUARD_RETURN (LockType, Guard, m_OutBufferLock, -1);
|
||||
|
||||
@@ -252,7 +252,7 @@ int WorldSocket::open (void *a)
|
||||
|
||||
if (peer().get_remote_addr(remote_addr) == -1)
|
||||
{
|
||||
sLog->outError ("WorldSocket::open: peer().get_remote_addr errno = %s", ACE_OS::strerror (errno));
|
||||
sLog->outError("WorldSocket::open: peer().get_remote_addr errno = %s", ACE_OS::strerror (errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -277,7 +277,7 @@ int WorldSocket::open (void *a)
|
||||
// Register with ACE Reactor
|
||||
if (reactor()->register_handler(this, ACE_Event_Handler::READ_MASK | ACE_Event_Handler::WRITE_MASK) == -1)
|
||||
{
|
||||
sLog->outError ("WorldSocket::open: unable to register client handler errno = %s", ACE_OS::strerror (errno));
|
||||
sLog->outError("WorldSocket::open: unable to register client handler errno = %s", ACE_OS::strerror (errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -496,7 +496,7 @@ int WorldSocket::handle_input_header (void)
|
||||
if ((header.size < 4) || (header.size > 10240) || (header.cmd > 10240))
|
||||
{
|
||||
Player* _player = m_Session ? m_Session->GetPlayer() : NULL;
|
||||
sLog->outError ("WorldSocket::handle_input_header(): client (account: %u, char [GUID: %u, name: %s]) sent malformed packet (size: %d, cmd: %d)",
|
||||
sLog->outError("WorldSocket::handle_input_header(): client (account: %u, char [GUID: %u, name: %s]) sent malformed packet (size: %d, cmd: %d)",
|
||||
m_Session ? m_Session->GetAccountId() : 0,
|
||||
_player ? _player->GetGUIDLow() : 0,
|
||||
_player ? _player->GetName() : "<none>",
|
||||
@@ -602,7 +602,7 @@ int WorldSocket::handle_input_missing_data (void)
|
||||
// hope this is not hack, as proper m_RecvWPct is asserted around
|
||||
if (!m_RecvWPct)
|
||||
{
|
||||
sLog->outError ("Forcing close on input m_RecvWPct = NULL");
|
||||
sLog->outError("Forcing close on input m_RecvWPct = NULL");
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
@@ -648,7 +648,7 @@ int WorldSocket::cancel_wakeup_output (GuardType& g)
|
||||
(this, ACE_Event_Handler::WRITE_MASK) == -1)
|
||||
{
|
||||
// would be good to store errno from reactor with errno guard
|
||||
sLog->outError ("WorldSocket::cancel_wakeup_output");
|
||||
sLog->outError("WorldSocket::cancel_wakeup_output");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -667,7 +667,7 @@ int WorldSocket::schedule_wakeup_output (GuardType& g)
|
||||
if (reactor()->schedule_wakeup
|
||||
(this, ACE_Event_Handler::WRITE_MASK) == -1)
|
||||
{
|
||||
sLog->outError ("WorldSocket::schedule_wakeup_output");
|
||||
sLog->outError("WorldSocket::schedule_wakeup_output");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -715,7 +715,7 @@ int WorldSocket::ProcessIncoming (WorldPacket* new_pct)
|
||||
case CMSG_AUTH_SESSION:
|
||||
if (m_Session)
|
||||
{
|
||||
sLog->outError ("WorldSocket::ProcessIncoming: Player send CMSG_AUTH_SESSION again");
|
||||
sLog->outError("WorldSocket::ProcessIncoming: Player send CMSG_AUTH_SESSION again");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -744,7 +744,7 @@ int WorldSocket::ProcessIncoming (WorldPacket* new_pct)
|
||||
}
|
||||
else
|
||||
{
|
||||
sLog->outError ("WorldSocket::ProcessIncoming: Client not authed opcode = %u", uint32(opcode));
|
||||
sLog->outError("WorldSocket::ProcessIncoming: Client not authed opcode = %u", uint32(opcode));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -788,9 +788,9 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
|
||||
{
|
||||
packet.Initialize(SMSG_AUTH_RESPONSE, 1);
|
||||
packet << uint8(AUTH_REJECT);
|
||||
SendPacket (packet);
|
||||
SendPacket(packet);
|
||||
|
||||
sLog->outError ("WorldSocket::HandleAuthSession: World closed, denying client (%s).", GetRemoteAddress().c_str());
|
||||
sLog->outError("WorldSocket::HandleAuthSession: World closed, denying client (%s).", GetRemoteAddress().c_str());
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -824,9 +824,9 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
|
||||
packet.Initialize (SMSG_AUTH_RESPONSE, 1);
|
||||
packet << uint8 (AUTH_UNKNOWN_ACCOUNT);
|
||||
|
||||
SendPacket (packet);
|
||||
SendPacket(packet);
|
||||
|
||||
sLog->outError ("WorldSocket::HandleAuthSession: Sent Auth Response (unknown account).");
|
||||
sLog->outError("WorldSocket::HandleAuthSession: Sent Auth Response (unknown account).");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -860,7 +860,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
|
||||
{
|
||||
packet.Initialize (SMSG_AUTH_RESPONSE, 1);
|
||||
packet << uint8 (AUTH_FAILED);
|
||||
SendPacket (packet);
|
||||
SendPacket(packet);
|
||||
|
||||
sLog->outBasic ("WorldSocket::HandleAuthSession: Sent Auth Response (Account IP differs).");
|
||||
return -1;
|
||||
@@ -924,9 +924,9 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
|
||||
{
|
||||
packet.Initialize (SMSG_AUTH_RESPONSE, 1);
|
||||
packet << uint8 (AUTH_BANNED);
|
||||
SendPacket (packet);
|
||||
SendPacket(packet);
|
||||
|
||||
sLog->outError ("WorldSocket::HandleAuthSession: Sent Auth Response (Account banned).");
|
||||
sLog->outError("WorldSocket::HandleAuthSession: Sent Auth Response (Account banned).");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -938,9 +938,9 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
|
||||
WorldPacket Packet (SMSG_AUTH_RESPONSE, 1);
|
||||
Packet << uint8 (AUTH_UNAVAILABLE);
|
||||
|
||||
SendPacket (packet);
|
||||
SendPacket(packet);
|
||||
|
||||
sLog->outDetail ("WorldSocket::HandleAuthSession: User tries to login but his security level is not enough");
|
||||
sLog->outDetail("WorldSocket::HandleAuthSession: User tries to login but his security level is not enough");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -960,9 +960,9 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
|
||||
packet.Initialize (SMSG_AUTH_RESPONSE, 1);
|
||||
packet << uint8 (AUTH_FAILED);
|
||||
|
||||
SendPacket (packet);
|
||||
SendPacket(packet);
|
||||
|
||||
sLog->outError ("WorldSocket::HandleAuthSession: Sent Auth Response (authentification failed).");
|
||||
sLog->outError("WorldSocket::HandleAuthSession: Sent Auth Response (authentification failed).");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -1067,7 +1067,7 @@ int WorldSocket::HandlePing (WorldPacket& recvPacket)
|
||||
m_Session->SetLatency (latency);
|
||||
else
|
||||
{
|
||||
sLog->outError ("WorldSocket::HandlePing: peer sent CMSG_PING, "
|
||||
sLog->outError("WorldSocket::HandlePing: peer sent CMSG_PING, "
|
||||
"but is not authenticated or got recently kicked, "
|
||||
" address = %s",
|
||||
GetRemoteAddress().c_str());
|
||||
@@ -1077,5 +1077,5 @@ int WorldSocket::HandlePing (WorldPacket& recvPacket)
|
||||
|
||||
WorldPacket packet (SMSG_PONG, 4);
|
||||
packet << ping;
|
||||
return SendPacket (packet);
|
||||
return SendPacket(packet);
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ class WorldSocket : public WorldHandler
|
||||
/// Send A packet on the socket, this function is reentrant.
|
||||
/// @param pct packet to send
|
||||
/// @return -1 of failure
|
||||
int SendPacket (const WorldPacket& pct);
|
||||
int SendPacket(const WorldPacket& pct);
|
||||
|
||||
/// Add reference to this object.
|
||||
long AddReference (void);
|
||||
|
||||
@@ -236,7 +236,7 @@ WorldSocketMgr::StartReactiveIO (ACE_UINT16 port, const char* address)
|
||||
|
||||
if (num_threads <= 0)
|
||||
{
|
||||
sLog->outError ("Network.Threads is wrong in your config file");
|
||||
sLog->outError("Network.Threads is wrong in your config file");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -253,7 +253,7 @@ WorldSocketMgr::StartReactiveIO (ACE_UINT16 port, const char* address)
|
||||
|
||||
if (m_SockOutUBuff <= 0)
|
||||
{
|
||||
sLog->outError ("Network.OutUBuff is wrong in your config file");
|
||||
sLog->outError("Network.OutUBuff is wrong in your config file");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -263,7 +263,7 @@ WorldSocketMgr::StartReactiveIO (ACE_UINT16 port, const char* address)
|
||||
|
||||
if (m_Acceptor->open(listen_addr, m_NetThreads[0].GetReactor(), ACE_NONBLOCK) == -1)
|
||||
{
|
||||
sLog->outError ("Failed to open acceptor, check if the port is free");
|
||||
sLog->outError("Failed to open acceptor, check if the port is free");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -327,7 +327,7 @@ WorldSocketMgr::OnSocketOpen (WorldSocket* sock)
|
||||
(void*) & m_SockOutKBuff,
|
||||
sizeof (int)) == -1 && errno != ENOTSUP)
|
||||
{
|
||||
sLog->outError ("WorldSocketMgr::OnSocketOpen set_option SO_SNDBUF");
|
||||
sLog->outError("WorldSocketMgr::OnSocketOpen set_option SO_SNDBUF");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -342,7 +342,7 @@ WorldSocketMgr::OnSocketOpen (WorldSocket* sock)
|
||||
(void*)&ndoption,
|
||||
sizeof (int)) == -1)
|
||||
{
|
||||
sLog->outError ("WorldSocketMgr::OnSocketOpen: peer().set_option TCP_NODELAY errno = %s", ACE_OS::strerror (errno));
|
||||
sLog->outError("WorldSocketMgr::OnSocketOpen: peer().set_option TCP_NODELAY errno = %s", ACE_OS::strerror (errno));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -267,7 +267,7 @@ void World::AddSession_(WorldSession* s)
|
||||
{
|
||||
AddQueuedPlayer (s);
|
||||
UpdateMaxSessionCounters();
|
||||
sLog->outDetail ("PlayerQueue: Account id %u is in Queue Position (%u).", s->GetAccountId(), ++QueueSize);
|
||||
sLog->outDetail("PlayerQueue: Account id %u is in Queue Position (%u).", s->GetAccountId(), ++QueueSize);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -284,7 +284,7 @@ void World::AddSession_(WorldSession* s)
|
||||
float popu = (float)GetActiveSessionCount(); // updated number of users on the server
|
||||
popu /= pLimit;
|
||||
popu *= 2;
|
||||
sLog->outDetail ("Server Population (%f).", popu);
|
||||
sLog->outDetail("Server Population (%f).", popu);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1764,7 +1764,7 @@ void World::SetInitialWorldSettings()
|
||||
|
||||
uint32 startupDuration = GetMSTimeDiffToNow(startupBegin);
|
||||
sLog->outString();
|
||||
sLog->outString("WORLD: World initialized in %u minutes %u seconds", (startupDuration / 60000), ((startupDuration % 60000) / 1000) );
|
||||
sLog->outString("WORLD: World initialized in %u minutes %u seconds", (startupDuration / 60000), ((startupDuration % 60000) / 1000));
|
||||
sLog->outString();
|
||||
}
|
||||
|
||||
|
||||
@@ -177,39 +177,39 @@ public:
|
||||
MobDeath_Timer = 2500;
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
switch (i)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 0:
|
||||
DoScriptText(SCRIPT_TEXT1, me);//2
|
||||
CanWalk = false;
|
||||
Event_Timer = 5000;
|
||||
break;
|
||||
case 1:
|
||||
DoScriptText(SCRIPT_TEXT2, me);//4
|
||||
CanWalk = false;
|
||||
Event_Timer = 5000;
|
||||
break;
|
||||
case 2:
|
||||
CanWalk = false;
|
||||
break;
|
||||
case 3:
|
||||
DoScriptText(SCRIPT_TEXT3, me);//5
|
||||
break;
|
||||
case 4:
|
||||
DoScriptText(SCRIPT_TEXT4, me);//6
|
||||
CanWalk = false;
|
||||
Event_Timer = 5000;
|
||||
break;
|
||||
case 5:
|
||||
if (instance)
|
||||
{
|
||||
instance->UpdateEncounterState(ENCOUNTER_CREDIT_KILL_CREATURE, NPC_GRIMSTONE, me);
|
||||
instance->SetData(TYPE_RING_OF_LAW, DONE);
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: npc_grimstone: event reached end and set complete.");
|
||||
}
|
||||
break;
|
||||
case 0:
|
||||
DoScriptText(SCRIPT_TEXT1, me);//2
|
||||
CanWalk = false;
|
||||
Event_Timer = 5000;
|
||||
break;
|
||||
case 1:
|
||||
DoScriptText(SCRIPT_TEXT2, me);//4
|
||||
CanWalk = false;
|
||||
Event_Timer = 5000;
|
||||
break;
|
||||
case 2:
|
||||
CanWalk = false;
|
||||
break;
|
||||
case 3:
|
||||
DoScriptText(SCRIPT_TEXT3, me);//5
|
||||
break;
|
||||
case 4:
|
||||
DoScriptText(SCRIPT_TEXT4, me);//6
|
||||
CanWalk = false;
|
||||
Event_Timer = 5000;
|
||||
break;
|
||||
case 5:
|
||||
if (instance)
|
||||
{
|
||||
instance->UpdateEncounterState(ENCOUNTER_CREDIT_KILL_CREATURE, NPC_GRIMSTONE, me);
|
||||
instance->SetData(TYPE_RING_OF_LAW, DONE);
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: npc_grimstone: event reached end and set complete.");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -611,18 +611,22 @@ public:
|
||||
{
|
||||
npc_dughal_stormwingAI(Creature* creature) : npc_escortAI(creature) {}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
switch (i)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 0:me->Say(SAY_DUGHAL_FREE, LANG_UNIVERSAL, PlayerGUID); break;
|
||||
case 1:instance->SetData(DATA_DUGHAL, ENCOUNTER_STATE_OBJECTIVE_COMPLETED);break;
|
||||
case 2:
|
||||
me->SetVisible(false);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
instance->SetData(DATA_DUGHAL, ENCOUNTER_STATE_ENDED);
|
||||
break;
|
||||
case 0:
|
||||
me->Say(SAY_DUGHAL_FREE, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
case 1:
|
||||
instance->SetData(DATA_DUGHAL, ENCOUNTER_STATE_OBJECTIVE_COMPLETED);
|
||||
break;
|
||||
case 2:
|
||||
me->SetVisible(false);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
instance->SetData(DATA_DUGHAL, ENCOUNTER_STATE_ENDED);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -712,14 +716,15 @@ public:
|
||||
bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest)
|
||||
{
|
||||
if (quest->GetQuestId() == 4322)
|
||||
{PlayerStart = player;
|
||||
{
|
||||
PlayerStart = player;
|
||||
if (instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED)
|
||||
{
|
||||
CAST_AI(npc_escort::npc_escortAI, (creature->AI()))->Start(true, false, player->GetGUID());
|
||||
instance->SetData(DATA_QUEST_JAIL_BREAK, ENCOUNTER_STATE_IN_PROGRESS);
|
||||
creature->setFaction(11);
|
||||
}
|
||||
CAST_AI(npc_escort::npc_escortAI, (creature->AI()))->Start(true, false, player->GetGUID());
|
||||
instance->SetData(DATA_QUEST_JAIL_BREAK, ENCOUNTER_STATE_IN_PROGRESS);
|
||||
creature->setFaction(11);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -730,60 +735,66 @@ public:
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
switch (i)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 1:
|
||||
me->Say(SAY_WINDSOR_1, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
case 7:
|
||||
me->HandleEmoteCommand(EMOTE_STATE_POINT);
|
||||
me->Say(SAY_WINDSOR_4_1, LANG_UNIVERSAL, PlayerGUID);
|
||||
IsOnHold=true;
|
||||
break;
|
||||
case 10:
|
||||
me->setFaction(534);
|
||||
break;
|
||||
case 12:
|
||||
me->Say(SAY_WINDSOR_6, LANG_UNIVERSAL, PlayerGUID);
|
||||
instance->SetData(DATA_SUPPLY_ROOM, ENCOUNTER_STATE_IN_PROGRESS);
|
||||
break;
|
||||
case 13:
|
||||
me->HandleEmoteCommand(EMOTE_STATE_USESTANDING);//EMOTE_STATE_WORK
|
||||
break;
|
||||
case 14:
|
||||
instance->SetData(DATA_GATE_SR, 0);
|
||||
me->setFaction(11);
|
||||
break;
|
||||
case 16:
|
||||
me->Say(SAY_WINDSOR_9, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
case 17:
|
||||
me->HandleEmoteCommand(EMOTE_STATE_USESTANDING);//EMOTE_STATE_WORK
|
||||
break;
|
||||
case 18:
|
||||
instance->SetData(DATA_GATE_SC, 0);
|
||||
break;
|
||||
case 19:
|
||||
me->SetVisible(false);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SummonCreature(MOB_ENTRY_REGINALD_WINDSOR, 403.61f, -51.71f, -63.92f, 3.600434f, TEMPSUMMON_DEAD_DESPAWN, 0);
|
||||
instance->SetData(DATA_SUPPLY_ROOM, ENCOUNTER_STATE_ENDED);
|
||||
break;
|
||||
case 1:
|
||||
me->Say(SAY_WINDSOR_1, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
case 7:
|
||||
me->HandleEmoteCommand(EMOTE_STATE_POINT);
|
||||
me->Say(SAY_WINDSOR_4_1, LANG_UNIVERSAL, PlayerGUID);
|
||||
IsOnHold = true;
|
||||
break;
|
||||
case 10:
|
||||
me->setFaction(534);
|
||||
break;
|
||||
case 12:
|
||||
me->Say(SAY_WINDSOR_6, LANG_UNIVERSAL, PlayerGUID);
|
||||
instance->SetData(DATA_SUPPLY_ROOM, ENCOUNTER_STATE_IN_PROGRESS);
|
||||
break;
|
||||
case 13:
|
||||
me->HandleEmoteCommand(EMOTE_STATE_USESTANDING);//EMOTE_STATE_WORK
|
||||
break;
|
||||
case 14:
|
||||
instance->SetData(DATA_GATE_SR, 0);
|
||||
me->setFaction(11);
|
||||
break;
|
||||
case 16:
|
||||
me->Say(SAY_WINDSOR_9, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
case 17:
|
||||
me->HandleEmoteCommand(EMOTE_STATE_USESTANDING);//EMOTE_STATE_WORK
|
||||
break;
|
||||
case 18:
|
||||
instance->SetData(DATA_GATE_SC, 0);
|
||||
break;
|
||||
case 19:
|
||||
me->SetVisible(false);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SummonCreature(MOB_ENTRY_REGINALD_WINDSOR, 403.61f, -51.71f, -63.92f, 3.600434f, TEMPSUMMON_DEAD_DESPAWN, 0);
|
||||
instance->SetData(DATA_SUPPLY_ROOM, ENCOUNTER_STATE_ENDED);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
{
|
||||
switch (urand(0, 2))
|
||||
{
|
||||
case 0: me->Say(SAY_WINDSOR_AGGRO1, LANG_UNIVERSAL, PlayerGUID); break;
|
||||
case 1: me->Say(SAY_WINDSOR_AGGRO2, LANG_UNIVERSAL, PlayerGUID); break;
|
||||
case 2: me->Say(SAY_WINDSOR_AGGRO3, LANG_UNIVERSAL, PlayerGUID); break;
|
||||
}
|
||||
case 0:
|
||||
me->Say(SAY_WINDSOR_AGGRO1, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
case 1:
|
||||
me->Say(SAY_WINDSOR_AGGRO2, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
case 2:
|
||||
me->Say(SAY_WINDSOR_AGGRO3, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Reset() {}
|
||||
|
||||
@@ -794,19 +805,22 @@ public:
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED) return;
|
||||
if (instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED)
|
||||
return;
|
||||
|
||||
if (instance->GetData(DATA_DUGHAL) == ENCOUNTER_STATE_OBJECTIVE_COMPLETED)
|
||||
SetEscortPaused(false);
|
||||
|
||||
if (!instance->GetData(DATA_GATE_D) && instance->GetData(DATA_DUGHAL) == ENCOUNTER_STATE_NOT_STARTED)
|
||||
{
|
||||
{
|
||||
me->Say(SAY_WINDSOR_4_2, LANG_UNIVERSAL, PlayerGUID);
|
||||
instance->SetData(DATA_DUGHAL, ENCOUNTER_STATE_BEFORE_START);
|
||||
}
|
||||
}
|
||||
if (instance->GetData(DATA_DUGHAL) == ENCOUNTER_STATE_OBJECTIVE_COMPLETED)
|
||||
{
|
||||
{
|
||||
me->Say(SAY_WINDSOR_4_3, LANG_UNIVERSAL, PlayerGUID);
|
||||
instance->SetData(DATA_DUGHAL, ENCOUNTER_STATE_ENDED);
|
||||
}
|
||||
}
|
||||
if ((instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_IN_PROGRESS || instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_FAILED || instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_ENDED)&& instance->GetData(DATA_SUPPLY_ROOM) == ENCOUNTER_STATE_ENDED)
|
||||
{
|
||||
me->SetVisible(false);
|
||||
@@ -900,61 +914,61 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
wp=i;
|
||||
switch (i)
|
||||
wp = waypointId;
|
||||
switch (waypointId)
|
||||
{
|
||||
case 0:
|
||||
me->setFaction(11);
|
||||
me->Say(SAY_REGINALD_WINDSOR_0_1, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
case 1:
|
||||
me->Say(SAY_REGINALD_WINDSOR_0_2, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
case 7:
|
||||
me->HandleEmoteCommand(EMOTE_STATE_POINT);
|
||||
me->Say(SAY_REGINALD_WINDSOR_5_1, LANG_UNIVERSAL, PlayerGUID);
|
||||
IsOnHold=true;
|
||||
break;
|
||||
case 8:
|
||||
me->Say(SAY_REGINALD_WINDSOR_5_2, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
case 11:
|
||||
me->HandleEmoteCommand(EMOTE_STATE_POINT);
|
||||
me->Say(SAY_REGINALD_WINDSOR_7_1, LANG_UNIVERSAL, PlayerGUID);
|
||||
IsOnHold=true;
|
||||
break;
|
||||
case 12:
|
||||
me->Say(SAY_REGINALD_WINDSOR_7_2, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
case 13:
|
||||
me->Say(SAY_REGINALD_WINDSOR_7_3, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
case 20:
|
||||
me->HandleEmoteCommand(EMOTE_STATE_POINT);
|
||||
me->Say(SAY_REGINALD_WINDSOR_13_1, LANG_UNIVERSAL, PlayerGUID);
|
||||
IsOnHold=true;
|
||||
break;
|
||||
case 21:
|
||||
me->Say(SAY_REGINALD_WINDSOR_13_3, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
case 23:
|
||||
me->HandleEmoteCommand(EMOTE_STATE_POINT);
|
||||
me->Say(SAY_REGINALD_WINDSOR_14_1, LANG_UNIVERSAL, PlayerGUID);
|
||||
IsOnHold=true;
|
||||
break;
|
||||
case 24:
|
||||
me->Say(SAY_REGINALD_WINDSOR_14_2, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
case 31:
|
||||
me->Say(SAY_REGINALD_WINDSOR_20_1, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
case 32:
|
||||
me->Say(SAY_REGINALD_WINDSOR_20_2, LANG_UNIVERSAL, PlayerGUID);
|
||||
PlayerStart->GroupEventHappens(QUEST_JAIL_BREAK, me);
|
||||
instance->SetData(DATA_SHILL, ENCOUNTER_STATE_ENDED);
|
||||
break;
|
||||
case 0:
|
||||
me->setFaction(11);
|
||||
me->Say(SAY_REGINALD_WINDSOR_0_1, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
case 1:
|
||||
me->Say(SAY_REGINALD_WINDSOR_0_2, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
case 7:
|
||||
me->HandleEmoteCommand(EMOTE_STATE_POINT);
|
||||
me->Say(SAY_REGINALD_WINDSOR_5_1, LANG_UNIVERSAL, PlayerGUID);
|
||||
IsOnHold=true;
|
||||
break;
|
||||
case 8:
|
||||
me->Say(SAY_REGINALD_WINDSOR_5_2, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
case 11:
|
||||
me->HandleEmoteCommand(EMOTE_STATE_POINT);
|
||||
me->Say(SAY_REGINALD_WINDSOR_7_1, LANG_UNIVERSAL, PlayerGUID);
|
||||
IsOnHold=true;
|
||||
break;
|
||||
case 12:
|
||||
me->Say(SAY_REGINALD_WINDSOR_7_2, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
case 13:
|
||||
me->Say(SAY_REGINALD_WINDSOR_7_3, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
case 20:
|
||||
me->HandleEmoteCommand(EMOTE_STATE_POINT);
|
||||
me->Say(SAY_REGINALD_WINDSOR_13_1, LANG_UNIVERSAL, PlayerGUID);
|
||||
IsOnHold=true;
|
||||
break;
|
||||
case 21:
|
||||
me->Say(SAY_REGINALD_WINDSOR_13_3, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
case 23:
|
||||
me->HandleEmoteCommand(EMOTE_STATE_POINT);
|
||||
me->Say(SAY_REGINALD_WINDSOR_14_1, LANG_UNIVERSAL, PlayerGUID);
|
||||
IsOnHold=true;
|
||||
break;
|
||||
case 24:
|
||||
me->Say(SAY_REGINALD_WINDSOR_14_2, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
case 31:
|
||||
me->Say(SAY_REGINALD_WINDSOR_20_1, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
case 32:
|
||||
me->Say(SAY_REGINALD_WINDSOR_20_2, LANG_UNIVERSAL, PlayerGUID);
|
||||
PlayerStart->GroupEventHappens(QUEST_JAIL_BREAK, me);
|
||||
instance->SetData(DATA_SHILL, ENCOUNTER_STATE_ENDED);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -978,14 +992,20 @@ public:
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
{
|
||||
switch (urand(0, 2))
|
||||
{
|
||||
case 0: me->Say(SAY_WINDSOR_AGGRO1, LANG_UNIVERSAL, PlayerGUID); break;
|
||||
case 1: me->Say(SAY_WINDSOR_AGGRO2, LANG_UNIVERSAL, PlayerGUID); break;
|
||||
case 2: me->Say(SAY_WINDSOR_AGGRO3, LANG_UNIVERSAL, PlayerGUID); break;
|
||||
}
|
||||
case 0:
|
||||
me->Say(SAY_WINDSOR_AGGRO1, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
case 1:
|
||||
me->Say(SAY_WINDSOR_AGGRO2, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
case 2:
|
||||
me->Say(SAY_WINDSOR_AGGRO3, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
}
|
||||
}
|
||||
void Reset() {}
|
||||
|
||||
void JustDied(Unit* slayer)
|
||||
@@ -995,47 +1015,49 @@ public:
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED) return;
|
||||
if (instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED)
|
||||
return;
|
||||
|
||||
if (wp == 7)
|
||||
{
|
||||
{
|
||||
if (!instance->GetData(DATA_GATE_J) && instance->GetData(DATA_JAZ) == ENCOUNTER_STATE_NOT_STARTED)
|
||||
{
|
||||
instance->SetData(DATA_CREATURE_JAZ, 1);
|
||||
instance->SetData(DATA_JAZ, ENCOUNTER_STATE_IN_PROGRESS);
|
||||
}
|
||||
{
|
||||
instance->SetData(DATA_CREATURE_JAZ, 1);
|
||||
instance->SetData(DATA_JAZ, ENCOUNTER_STATE_IN_PROGRESS);
|
||||
}
|
||||
if (instance->GetData(DATA_CREATURE_JAZ) && instance->GetData(DATA_CREATURE_OGRABISI) && instance->GetData(DATA_JAZ) == ENCOUNTER_STATE_IN_PROGRESS)
|
||||
{
|
||||
SetEscortPaused(false);
|
||||
instance->SetData(DATA_JAZ, ENCOUNTER_STATE_ENDED);
|
||||
}
|
||||
{
|
||||
SetEscortPaused(false);
|
||||
instance->SetData(DATA_JAZ, ENCOUNTER_STATE_ENDED);
|
||||
}
|
||||
}
|
||||
else if (wp == 11)
|
||||
{
|
||||
{
|
||||
if (!instance->GetData(DATA_GATE_S) && instance->GetData(DATA_SHILL) == ENCOUNTER_STATE_NOT_STARTED)
|
||||
{
|
||||
instance->SetData(DATA_CREATURE_SHILL, 1);
|
||||
instance->SetData(DATA_SHILL, ENCOUNTER_STATE_IN_PROGRESS);
|
||||
}
|
||||
if (instance->GetData(DATA_CREATURE_SHILL) && instance->GetData(DATA_SHILL) == ENCOUNTER_STATE_IN_PROGRESS)
|
||||
{
|
||||
instance->SetData(DATA_SHILL, ENCOUNTER_STATE_ENDED);
|
||||
SetEscortPaused(false);
|
||||
}
|
||||
}
|
||||
else if (wp == 20)
|
||||
{
|
||||
if (!instance->GetData(DATA_GATE_C) && instance->GetData(DATA_CREST) == ENCOUNTER_STATE_NOT_STARTED)
|
||||
{
|
||||
instance->SetData(DATA_CREATURE_CREST, 1);
|
||||
me->Say(SAY_REGINALD_WINDSOR_13_2, LANG_UNIVERSAL, PlayerGUID);
|
||||
instance->SetData(DATA_CREST, ENCOUNTER_STATE_IN_PROGRESS);
|
||||
}
|
||||
if (instance->GetData(DATA_CREATURE_CREST) && instance->GetData(DATA_CREST) == ENCOUNTER_STATE_IN_PROGRESS)
|
||||
{
|
||||
SetEscortPaused(false);
|
||||
instance->SetData(DATA_CREST, ENCOUNTER_STATE_ENDED);
|
||||
}
|
||||
instance->SetData(DATA_CREATURE_SHILL, 1);
|
||||
instance->SetData(DATA_SHILL, ENCOUNTER_STATE_IN_PROGRESS);
|
||||
}
|
||||
if (instance->GetData(DATA_CREATURE_SHILL) && instance->GetData(DATA_SHILL) == ENCOUNTER_STATE_IN_PROGRESS)
|
||||
{
|
||||
instance->SetData(DATA_SHILL, ENCOUNTER_STATE_ENDED);
|
||||
SetEscortPaused(false);
|
||||
}
|
||||
}
|
||||
else if (wp == 20)
|
||||
{
|
||||
if (!instance->GetData(DATA_GATE_C) && instance->GetData(DATA_CREST) == ENCOUNTER_STATE_NOT_STARTED)
|
||||
{
|
||||
instance->SetData(DATA_CREATURE_CREST, 1);
|
||||
me->Say(SAY_REGINALD_WINDSOR_13_2, LANG_UNIVERSAL, PlayerGUID);
|
||||
instance->SetData(DATA_CREST, ENCOUNTER_STATE_IN_PROGRESS);
|
||||
}
|
||||
if (instance->GetData(DATA_CREATURE_CREST) && instance->GetData(DATA_CREST) == ENCOUNTER_STATE_IN_PROGRESS)
|
||||
{
|
||||
SetEscortPaused(false);
|
||||
instance->SetData(DATA_CREST, ENCOUNTER_STATE_ENDED);
|
||||
}
|
||||
}
|
||||
if (instance->GetData(DATA_TOBIAS) == ENCOUNTER_STATE_OBJECTIVE_COMPLETED) SetEscortPaused(false);
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
}
|
||||
@@ -1045,6 +1067,7 @@ public:
|
||||
|
||||
// npc_tobias_seecher
|
||||
#define SAY_TOBIAS_FREE "Thank you! I will run for safety immediately!"
|
||||
|
||||
/*
|
||||
class npc_tobias_seecher : public CreatureScript
|
||||
{
|
||||
@@ -1105,25 +1128,30 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
switch (i)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 0:me->Say(SAY_TOBIAS_FREE, LANG_UNIVERSAL, PlayerGUID); break;
|
||||
case 2:
|
||||
instance->SetData(DATA_TOBIAS, ENCOUNTER_STATE_OBJECTIVE_COMPLETED);break;
|
||||
case 4:
|
||||
me->SetVisible(false);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
instance->SetData(DATA_TOBIAS, ENCOUNTER_STATE_ENDED);
|
||||
break;
|
||||
case 0:
|
||||
me->Say(SAY_TOBIAS_FREE, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
case 2:
|
||||
instance->SetData(DATA_TOBIAS, ENCOUNTER_STATE_OBJECTIVE_COMPLETED);
|
||||
break;
|
||||
case 4:
|
||||
me->SetVisible(false);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
instance->SetData(DATA_TOBIAS, ENCOUNTER_STATE_ENDED);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED) return;
|
||||
if (instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED)
|
||||
return;
|
||||
|
||||
if ((instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_IN_PROGRESS || instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_FAILED || instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_ENDED)&& instance->GetData(DATA_TOBIAS) == ENCOUNTER_STATE_ENDED)
|
||||
{
|
||||
me->SetVisible(false);
|
||||
@@ -1226,29 +1254,29 @@ public:
|
||||
go->SetGoState((GOState)state);
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
switch (i)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 1:
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_KICK);
|
||||
break;
|
||||
case 2:
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_ATTACK_UNARMED);
|
||||
break;
|
||||
case 3:
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_ATTACK_UNARMED);
|
||||
break;
|
||||
case 4:
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_KICK);
|
||||
break;
|
||||
case 5:
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_KICK);
|
||||
BreakKeg_Timer = 2000;
|
||||
break;
|
||||
case 1:
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_KICK);
|
||||
break;
|
||||
case 2:
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_ATTACK_UNARMED);
|
||||
break;
|
||||
case 3:
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_ATTACK_UNARMED);
|
||||
break;
|
||||
case 4:
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_KICK);
|
||||
break;
|
||||
case 5:
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_KICK);
|
||||
BreakKeg_Timer = 2000;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -266,14 +266,14 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 uiPoint)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
//just in case
|
||||
if (GetPlayerForEscort())
|
||||
if (me->getFaction() != GetPlayerForEscort()->getFaction())
|
||||
me->setFaction(GetPlayerForEscort()->getFaction());
|
||||
|
||||
switch (uiPoint)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 3:
|
||||
SetEscortPaused(true);
|
||||
|
||||
@@ -158,12 +158,12 @@ public:
|
||||
|
||||
void EnterCombat(Unit* /*who*/) {}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
switch (i)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 0:
|
||||
DoCast(me, SPELL_TUXEDO, false);
|
||||
|
||||
@@ -994,9 +994,9 @@ public:
|
||||
SetDespawnAtFar(false);
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
switch (i)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 1:
|
||||
if (Unit* car = Unit::GetCreature(*me, carGUID))
|
||||
|
||||
@@ -239,9 +239,9 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 uiPointId)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
switch (uiPointId)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 0:
|
||||
DoScriptText(SAY_BREAKOUT1, me);
|
||||
|
||||
@@ -497,9 +497,9 @@ public:
|
||||
SetEscortPaused(bOnHold);
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 wpId)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
switch (wpId)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 0:
|
||||
me->SetWalk(false);
|
||||
@@ -507,7 +507,6 @@ public:
|
||||
break;
|
||||
case 1:
|
||||
SetHoldState(true);
|
||||
|
||||
SpawnNPC();
|
||||
if (Creature* temp = Unit::GetCreature(*me, uiKorfaxGUID))
|
||||
DoScriptText(SAY_LIGHT_OF_DAWN07, temp);
|
||||
|
||||
@@ -152,7 +152,12 @@ public:
|
||||
uint32 Start_Timer;
|
||||
|
||||
void Reset() {}
|
||||
void WaypointReached(uint32 /*point*/) {}
|
||||
|
||||
void WaypointReached(uint32 /*waypointId*/)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) {}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
|
||||
@@ -99,9 +99,9 @@ public:
|
||||
InstanceScript* instance;
|
||||
uint32 uiNpcEntry;
|
||||
|
||||
void WaypointReached(uint32 uiPoint)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
switch (uiPoint)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 0:
|
||||
if (uiNpcEntry == NPC_ASH)
|
||||
|
||||
@@ -64,43 +64,42 @@ class npc_professor_phizzlethorpe : public CreatureScript
|
||||
{
|
||||
npc_professor_phizzlethorpeAI(Creature* creature) : npc_escortAI(creature) {}
|
||||
|
||||
void WaypointReached(uint32 uiPointId)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (uiPointId)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 4:
|
||||
Talk(SAY_PROGRESS_2, player->GetGUID());
|
||||
break;
|
||||
case 5:
|
||||
Talk(SAY_PROGRESS_3, player->GetGUID());
|
||||
break;
|
||||
case 8:
|
||||
Talk(EMOTE_PROGRESS_4);
|
||||
break;
|
||||
case 9:
|
||||
me->SummonCreature(MOB_VENGEFUL_SURGE, -2052.96f, -2142.49f, 20.15f, 1.0f, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
me->SummonCreature(MOB_VENGEFUL_SURGE, -2052.96f, -2142.49f, 20.15f, 1.0f, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
break;
|
||||
case 10:
|
||||
Talk(SAY_PROGRESS_5, player->GetGUID());
|
||||
break;
|
||||
case 11:
|
||||
Talk(SAY_PROGRESS_6, player->GetGUID());
|
||||
SetRun();
|
||||
break;
|
||||
case 19:
|
||||
Talk(SAY_PROGRESS_7, player->GetGUID());
|
||||
break;
|
||||
case 20:
|
||||
Talk(EMOTE_PROGRESS_8);
|
||||
Talk(SAY_PROGRESS_9, player->GetGUID());
|
||||
CAST_PLR(player)->GroupEventHappens(QUEST_SUNKEN_TREASURE, me);
|
||||
break;
|
||||
case 4:
|
||||
Talk(SAY_PROGRESS_2, player->GetGUID());
|
||||
break;
|
||||
case 5:
|
||||
Talk(SAY_PROGRESS_3, player->GetGUID());
|
||||
break;
|
||||
case 8:
|
||||
Talk(EMOTE_PROGRESS_4);
|
||||
break;
|
||||
case 9:
|
||||
me->SummonCreature(MOB_VENGEFUL_SURGE, -2052.96f, -2142.49f, 20.15f, 1.0f, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
me->SummonCreature(MOB_VENGEFUL_SURGE, -2052.96f, -2142.49f, 20.15f, 1.0f, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
break;
|
||||
case 10:
|
||||
Talk(SAY_PROGRESS_5, player->GetGUID());
|
||||
break;
|
||||
case 11:
|
||||
Talk(SAY_PROGRESS_6, player->GetGUID());
|
||||
SetRun();
|
||||
break;
|
||||
case 19:
|
||||
Talk(SAY_PROGRESS_7, player->GetGUID());
|
||||
break;
|
||||
case 20:
|
||||
Talk(EMOTE_PROGRESS_8);
|
||||
Talk(SAY_PROGRESS_9, player->GetGUID());
|
||||
CAST_PLR(player)->GroupEventHappens(QUEST_SUNKEN_TREASURE, me);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -130,14 +130,13 @@ public:
|
||||
{
|
||||
npc_ranger_lilathaAI(Creature* creature) : npc_escortAI(creature) {}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (i)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 0:
|
||||
me->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
@@ -145,16 +144,13 @@ public:
|
||||
Cage->SetGoState(GO_STATE_ACTIVE);
|
||||
DoScriptText(SAY_START, me, player);
|
||||
break;
|
||||
|
||||
case 5:
|
||||
DoScriptText(SAY_PROGRESS1, me, player);
|
||||
break;
|
||||
|
||||
case 11:
|
||||
DoScriptText(SAY_PROGRESS2, me, player);
|
||||
me->SetOrientation(4.762841f);
|
||||
break;
|
||||
|
||||
case 18:
|
||||
{
|
||||
DoScriptText(SAY_PROGRESS3, me, player);
|
||||
@@ -168,25 +164,20 @@ public:
|
||||
me->AI()->AttackStart(Summ1);
|
||||
}
|
||||
break;
|
||||
|
||||
case 19:
|
||||
me->SetWalk(false);
|
||||
break;
|
||||
|
||||
case 25:
|
||||
me->SetWalk(true);
|
||||
break;
|
||||
|
||||
case 30:
|
||||
if (player->GetTypeId() == TYPEID_PLAYER)
|
||||
CAST_PLR(player)->GroupEventHappens(QUEST_ESCAPE_FROM_THE_CATACOMBS, me);
|
||||
break;
|
||||
|
||||
case 32:
|
||||
me->SetOrientation(2.978281f);
|
||||
DoScriptText(SAY_END1, me, player);
|
||||
break;
|
||||
|
||||
case 33:
|
||||
me->SetOrientation(5.858011f);
|
||||
DoScriptText(SAY_END2, me, player);
|
||||
|
||||
@@ -87,9 +87,9 @@ public:
|
||||
|
||||
void Reset() { }
|
||||
|
||||
void WaypointReached(uint32 uiPointId)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
switch (uiPointId)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 26:
|
||||
DoScriptText(SAY_OOX_AMBUSH, me);
|
||||
@@ -276,14 +276,13 @@ public:
|
||||
summoned->GetMotionMaster()->MovePoint(0, m_afAmbushMoveTo[m_iSpawnId].m_fX, m_afAmbushMoveTo[m_iSpawnId].m_fY, m_afAmbushMoveTo[m_iSpawnId].m_fZ);
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 uiPointId)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (uiPointId)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 1:
|
||||
DoScriptText(SAY_RIN_FREE, me, player);
|
||||
|
||||
@@ -76,17 +76,16 @@ public:
|
||||
uiShieldBashTimer = 8000;
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 uiI)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
if (uiI >= 65 && me->GetUnitMovementFlags() == MOVEMENTFLAG_WALKING)
|
||||
if (waypointId >= 65 && me->GetUnitMovementFlags() == MOVEMENTFLAG_WALKING)
|
||||
me->SetWalk(false);
|
||||
|
||||
switch (uiI)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 39:
|
||||
SetEscortPaused(true);
|
||||
|
||||
@@ -66,50 +66,41 @@ public:
|
||||
{
|
||||
npc_deathstalker_erlandAI(Creature* creature) : npc_escortAI(creature) {}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (i)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 1:
|
||||
DoScriptText(SAY_START, me, player);
|
||||
break;
|
||||
|
||||
case 13:
|
||||
DoScriptText(SAY_LAST, me, player);
|
||||
player->GroupEventHappens(QUEST_ESCORTING, me);
|
||||
break;
|
||||
|
||||
case 14:
|
||||
DoScriptText(SAY_THANKS, me, player);
|
||||
break;
|
||||
|
||||
case 15:
|
||||
if (Unit* Rane = me->FindNearestCreature(NPC_RANE, 20))
|
||||
DoScriptText(SAY_RANE, Rane);
|
||||
break;
|
||||
|
||||
case 16:
|
||||
DoScriptText(SAY_ANSWER, me);
|
||||
break;
|
||||
|
||||
case 17:
|
||||
DoScriptText(SAY_MOVE_QUINN, me);
|
||||
break;
|
||||
|
||||
case 24:
|
||||
DoScriptText(SAY_GREETINGS, me);
|
||||
break;
|
||||
|
||||
case 25:
|
||||
if (Unit* Quinn = me->FindNearestCreature(NPC_QUINN, 20))
|
||||
DoScriptText(SAY_QUINN, Quinn);
|
||||
break;
|
||||
|
||||
case 26:
|
||||
DoScriptText(SAY_ON_BYE, me, NULL);
|
||||
break;
|
||||
|
||||
@@ -268,9 +268,9 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 uiPointId)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
switch (uiPointId)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 14:
|
||||
SetEscortPaused(true);
|
||||
@@ -497,9 +497,9 @@ public:
|
||||
uiPhase = 0;
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 uiPointId)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
switch (uiPointId)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 1:
|
||||
SetEscortPaused(true);
|
||||
|
||||
@@ -106,24 +106,24 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 uiPointId)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
switch (uiPointId)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 0:
|
||||
if (GameObject* pCage = me->GetMap()->GetGameObject(m_uiGalensCageGUID))
|
||||
pCage->ResetDoorOrButton();
|
||||
break;
|
||||
case 20:
|
||||
if (Player* player = GetPlayerForEscort())
|
||||
{
|
||||
me->SetFacingToObject(player);
|
||||
DoScriptText(SAY_QUEST_COMPLETE, me, player);
|
||||
DoScriptText(EMOTE_WHISPER, me, player);
|
||||
player->GroupEventHappens(QUEST_GALENS_ESCAPE, me);
|
||||
}
|
||||
SetRun(true);
|
||||
break;
|
||||
case 0:
|
||||
if (GameObject* pCage = me->GetMap()->GetGameObject(m_uiGalensCageGUID))
|
||||
pCage->ResetDoorOrButton();
|
||||
break;
|
||||
case 20:
|
||||
if (Player* player = GetPlayerForEscort())
|
||||
{
|
||||
me->SetFacingToObject(player);
|
||||
DoScriptText(SAY_QUEST_COMPLETE, me, player);
|
||||
DoScriptText(EMOTE_WHISPER, me, player);
|
||||
player->GroupEventHappens(QUEST_GALENS_ESCAPE, me);
|
||||
}
|
||||
SetRun(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -328,10 +328,11 @@ public:
|
||||
summoned->AI()->AttackStart(me);
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
switch (i)
|
||||
|
||||
switch (waypointId)
|
||||
{
|
||||
case 8:
|
||||
DoScriptText(SAY_WP_0, me);
|
||||
|
||||
@@ -85,9 +85,15 @@ public:
|
||||
{
|
||||
switch (uiWPHolder)
|
||||
{
|
||||
case 7: DoScriptText(SAY_DS_DOWN_1, me); break;
|
||||
case 8: DoScriptText(SAY_DS_DOWN_2, me); break;
|
||||
case 9: DoScriptText(SAY_DS_DOWN_3, me); break;
|
||||
case 7:
|
||||
DoScriptText(SAY_DS_DOWN_1, me);
|
||||
break;
|
||||
case 8:
|
||||
DoScriptText(SAY_DS_DOWN_2, me);
|
||||
break;
|
||||
case 9:
|
||||
DoScriptText(SAY_DS_DOWN_3, me);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -96,16 +102,15 @@ public:
|
||||
uiShootTimer = 0;
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 uiPoint)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
uiWPHolder = uiPoint;
|
||||
uiWPHolder = waypointId;
|
||||
|
||||
switch (uiPoint)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 4:
|
||||
SetEquipmentSlots(false, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE, EQUIP_ID_RIFLE);
|
||||
@@ -226,14 +231,13 @@ public:
|
||||
{
|
||||
npc_defias_traitorAI(Creature* creature) : npc_escortAI(creature) { Reset(); }
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (i)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 35:
|
||||
SetRun(false);
|
||||
|
||||
@@ -67,14 +67,13 @@ public:
|
||||
m_bFriendSummoned = false;
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 uiPointId)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
switch (uiPointId)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 2:
|
||||
if (me->HasStealthAura())
|
||||
me->RemoveAurasByType(SPELL_AURA_MOD_STEALTH);
|
||||
|
||||
SetRun();
|
||||
me->setFaction(FACTION_ENEMY);
|
||||
break;
|
||||
|
||||
@@ -75,9 +75,9 @@ class example_escort : public CreatureScript
|
||||
}
|
||||
|
||||
// Pure Virtual Functions (Have to be implemented)
|
||||
void WaypointReached(uint32 uiWP)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
switch (uiWP)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 1:
|
||||
DoScriptText(SAY_WP_1, me);
|
||||
|
||||
@@ -236,9 +236,9 @@ public:
|
||||
Start(false, false, 0);
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 uiPoint)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
switch (uiPoint)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 4:
|
||||
SetEscortPaused(true);
|
||||
|
||||
@@ -115,9 +115,9 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
if (i == 7 && instance)
|
||||
if (waypointId == 7 && instance)
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_JAINAPROUDMOORE));
|
||||
if (target && target->isAlive())
|
||||
|
||||
@@ -644,7 +644,11 @@ public:
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
void WaypointReached(uint32 /*i*/){}
|
||||
|
||||
void WaypointReached(uint32 /*waypointId*/)
|
||||
{
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
@@ -111,9 +111,9 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
if (i == 7 && instance)
|
||||
if (waypointId == 7 && instance)
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL));
|
||||
if (target && target->isAlive())
|
||||
@@ -241,7 +241,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 /*i*/)
|
||||
void WaypointReached(uint32 /*waypointId*/)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -103,9 +103,9 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
if (i == 7 && instance)
|
||||
if (waypointId == 7 && instance)
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL));
|
||||
if (target && target->isAlive())
|
||||
|
||||
+2
-2
@@ -105,9 +105,9 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
if (i == 7 && instance)
|
||||
if (waypointId == 7 && instance)
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_JAINAPROUDMOORE));
|
||||
if (target && target->isAlive())
|
||||
|
||||
@@ -980,9 +980,9 @@ void hyjalAI::RespawnNearPos(float x, float y)
|
||||
cell.Visit(p, obj_worker, *me->GetMap(), *me, me->GetGridActivationRange());
|
||||
}
|
||||
|
||||
void hyjalAI::WaypointReached(uint32 i)
|
||||
void hyjalAI::WaypointReached(uint32 waypointId)
|
||||
{
|
||||
if (i == 1 || (i == 0 && me->GetEntry() == THRALL))
|
||||
if (waypointId == 1 || (waypointId == 0 && me->GetEntry() == THRALL))
|
||||
{
|
||||
me->MonsterYell(YELL_HURRY, 0, 0);
|
||||
WaitForTeleport = true;
|
||||
|
||||
@@ -196,7 +196,7 @@ struct hyjalAI : public npc_escortAI
|
||||
void SummonedCreatureDespawn(Creature* summoned);
|
||||
void HideNearPos(float x, float y);
|
||||
void RespawnNearPos(float x, float y);
|
||||
void WaypointReached(uint32 i);
|
||||
void WaypointReached(uint32 waypointId);
|
||||
void DoOverrun(uint32 faction, const uint32 diff);
|
||||
void MoveInLineOfSight(Unit* who);
|
||||
|
||||
|
||||
@@ -425,9 +425,9 @@ public:
|
||||
|
||||
void EnterCombat(Unit* /*who*/) {}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
if (i == 0 && instance && !IsOverrun)
|
||||
if (waypointId == 0 && instance && !IsOverrun)
|
||||
{
|
||||
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall
|
||||
{
|
||||
@@ -550,22 +550,24 @@ public:
|
||||
KnockDownTimer = 10000;
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
if (i == 7 && instance && !IsOverrun)
|
||||
if (waypointId == 7 && instance && !IsOverrun)
|
||||
{
|
||||
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL));
|
||||
if (target && target->isAlive())
|
||||
me->AddThreat(target, 0.0f);
|
||||
}else{
|
||||
}
|
||||
else
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_JAINAPROUDMOORE));
|
||||
if (target && target->isAlive())
|
||||
me->AddThreat(target, 0.0f);
|
||||
}
|
||||
}
|
||||
if (i == LastOverronPos && IsOverrun)
|
||||
if (waypointId == LastOverronPos && IsOverrun)
|
||||
{
|
||||
if ((faction == 0 && LastOverronPos == 17) || (faction == 1 && LastOverronPos == 21))
|
||||
{
|
||||
@@ -652,22 +654,24 @@ public:
|
||||
RandomMove = false;
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
if (i == 7 && instance && !IsOverrun)
|
||||
if (waypointId == 7 && instance && !IsOverrun)
|
||||
{
|
||||
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL));
|
||||
if (target && target->isAlive())
|
||||
me->AddThreat(target, 0.0f);
|
||||
}else{
|
||||
}
|
||||
else
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_JAINAPROUDMOORE));
|
||||
if (target && target->isAlive())
|
||||
me->AddThreat(target, 0.0f);
|
||||
}
|
||||
}
|
||||
if (i == LastOverronPos && IsOverrun)
|
||||
if (waypointId == LastOverronPos && IsOverrun)
|
||||
{
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_ATTACK_UNARMED);
|
||||
if ((faction == 0 && LastOverronPos == 17) || (faction == 1 && LastOverronPos == 21))
|
||||
@@ -675,7 +679,6 @@ public:
|
||||
me->setDeathState(DEAD);
|
||||
me->RemoveCorpse();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -770,16 +773,18 @@ public:
|
||||
summons.Despawn(summon);
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
if (i == 7 && instance && !IsOverrun)
|
||||
if (waypointId == 7 && instance && !IsOverrun)
|
||||
{
|
||||
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL));
|
||||
if (target && target->isAlive())
|
||||
me->AddThreat(target, 0.0f);
|
||||
}else{
|
||||
}
|
||||
else
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_JAINAPROUDMOORE));
|
||||
if (target && target->isAlive())
|
||||
me->AddThreat(target, 0.0f);
|
||||
@@ -888,16 +893,18 @@ public:
|
||||
ShellTimer = 50000+rand()%10000;
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
if (i == 7 && instance && !IsOverrun)
|
||||
if (waypointId == 7 && instance && !IsOverrun)
|
||||
{
|
||||
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL));
|
||||
if (target && target->isAlive())
|
||||
me->AddThreat(target, 0.0f);
|
||||
}else{
|
||||
}
|
||||
else
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_JAINAPROUDMOORE));
|
||||
if (target && target->isAlive())
|
||||
me->AddThreat(target, 0.0f);
|
||||
@@ -987,16 +994,18 @@ public:
|
||||
WebTimer = 20000+rand()%5000;
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
if (i == 7 && instance && !IsOverrun)
|
||||
if (waypointId == 7 && instance && !IsOverrun)
|
||||
{
|
||||
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL));
|
||||
if (target && target->isAlive())
|
||||
me->AddThreat(target, 0.0f);
|
||||
}else{
|
||||
}
|
||||
else
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_JAINAPROUDMOORE));
|
||||
if (target && target->isAlive())
|
||||
me->AddThreat(target, 0.0f);
|
||||
@@ -1077,16 +1086,18 @@ public:
|
||||
ManaBurnTimer = 9000+rand()%5000;
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
if (i == 7 && instance && !IsOverrun)
|
||||
if (waypointId == 7 && instance && !IsOverrun)
|
||||
{
|
||||
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL));
|
||||
if (target && target->isAlive())
|
||||
me->AddThreat(target, 0.0f);
|
||||
}else{
|
||||
}
|
||||
else
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_JAINAPROUDMOORE));
|
||||
if (target && target->isAlive())
|
||||
me->AddThreat(target, 0.0f);
|
||||
@@ -1170,9 +1181,9 @@ public:
|
||||
me->SetDisableGravity(true);
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
if (i == 2 && instance && !IsOverrun)
|
||||
if (waypointId == 2 && instance && !IsOverrun)
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL));
|
||||
if (target && target->isAlive())
|
||||
@@ -1289,9 +1300,9 @@ public:
|
||||
me->SetDisableGravity(true);
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
if (i == 2 && instance && !IsOverrun)
|
||||
if (waypointId == 2 && instance && !IsOverrun)
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL));
|
||||
if (target && target->isAlive())
|
||||
|
||||
+2
-2
@@ -446,9 +446,9 @@ public:
|
||||
++uiStep;
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 uiPointId)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
switch (uiPointId)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
|
||||
@@ -296,12 +296,12 @@ public:
|
||||
bool LowHp;
|
||||
bool HadMount;
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
switch (i)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 8:
|
||||
SetRun(false);
|
||||
@@ -433,7 +433,6 @@ public:
|
||||
//trigger epoch Yell("Thrall! Come outside and face your fate! ....")
|
||||
//from here, thrall should not never be allowed to move to point 106 which he currently does.
|
||||
break;
|
||||
|
||||
case 106:
|
||||
{
|
||||
//trigger taretha to run down outside
|
||||
@@ -631,9 +630,9 @@ public:
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
switch (i)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 6:
|
||||
DoScriptText(SAY_TA_FREE, me);
|
||||
@@ -643,6 +642,7 @@ public:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Reset() {}
|
||||
void EnterCombat(Unit* /*who*/) {}
|
||||
|
||||
|
||||
@@ -72,55 +72,54 @@ public:
|
||||
{
|
||||
npc_willixAI(Creature* creature) : npc_escortAI(creature) {}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (i)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 3:
|
||||
me->HandleEmoteCommand(EMOTE_STATE_POINT);
|
||||
DoScriptText(SAY_POINT, me, player);
|
||||
break;
|
||||
case 4:
|
||||
me->SummonCreature(ENTRY_BOAR, 2137.66f, 1843.98f, 48.08f, 1.54f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
break;
|
||||
case 8:
|
||||
DoScriptText(SAY_BLUELEAF, me, player);
|
||||
break;
|
||||
case 9:
|
||||
DoScriptText(SAY_DANGER, me, player);
|
||||
break;
|
||||
case 13:
|
||||
DoScriptText(SAY_BAD, me, player);
|
||||
break;
|
||||
case 14:
|
||||
me->SummonCreature(ENTRY_BOAR, 2078.91f, 1704.54f, 56.77f, 1.54f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
break;
|
||||
case 25:
|
||||
DoScriptText(SAY_THINK, me, player);
|
||||
break;
|
||||
case 31:
|
||||
DoScriptText(SAY_SOON, me, player);
|
||||
break;
|
||||
case 42:
|
||||
DoScriptText(SAY_FINALY, me, player);
|
||||
break;
|
||||
case 43:
|
||||
me->SummonCreature(ENTRY_BOAR, 1956.43f, 1596.97f, 81.75f, 1.54f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
break;
|
||||
case 45:
|
||||
DoScriptText(SAY_WIN, me, player);
|
||||
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
|
||||
if (player->GetTypeId() == TYPEID_PLAYER)
|
||||
CAST_PLR(player)->GroupEventHappens(QUEST_WILLIX_THE_IMPORTER, me);
|
||||
break;
|
||||
case 46:
|
||||
DoScriptText(SAY_END, me, player);
|
||||
break;
|
||||
case 3:
|
||||
me->HandleEmoteCommand(EMOTE_STATE_POINT);
|
||||
DoScriptText(SAY_POINT, me, player);
|
||||
break;
|
||||
case 4:
|
||||
me->SummonCreature(ENTRY_BOAR, 2137.66f, 1843.98f, 48.08f, 1.54f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
break;
|
||||
case 8:
|
||||
DoScriptText(SAY_BLUELEAF, me, player);
|
||||
break;
|
||||
case 9:
|
||||
DoScriptText(SAY_DANGER, me, player);
|
||||
break;
|
||||
case 13:
|
||||
DoScriptText(SAY_BAD, me, player);
|
||||
break;
|
||||
case 14:
|
||||
me->SummonCreature(ENTRY_BOAR, 2078.91f, 1704.54f, 56.77f, 1.54f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
break;
|
||||
case 25:
|
||||
DoScriptText(SAY_THINK, me, player);
|
||||
break;
|
||||
case 31:
|
||||
DoScriptText(SAY_SOON, me, player);
|
||||
break;
|
||||
case 42:
|
||||
DoScriptText(SAY_FINALY, me, player);
|
||||
break;
|
||||
case 43:
|
||||
me->SummonCreature(ENTRY_BOAR, 1956.43f, 1596.97f, 81.75f, 1.54f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
break;
|
||||
case 45:
|
||||
DoScriptText(SAY_WIN, me, player);
|
||||
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
|
||||
if (player->GetTypeId() == TYPEID_PLAYER)
|
||||
CAST_PLR(player)->GroupEventHappens(QUEST_WILLIX_THE_IMPORTER, me);
|
||||
break;
|
||||
case 46:
|
||||
DoScriptText(SAY_END, me, player);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -151,35 +151,35 @@ public:
|
||||
uint32 eventProgress;
|
||||
InstanceScript* instance;
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
switch (i)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 4:
|
||||
eventProgress = 1;
|
||||
currentEvent = TYPE_NARALEX_PART1;
|
||||
instance->SetData(TYPE_NARALEX_PART1, IN_PROGRESS);
|
||||
break;
|
||||
break;
|
||||
case 5:
|
||||
DoScriptText(SAY_MUST_CONTINUE, me);
|
||||
instance->SetData(TYPE_NARALEX_PART1, DONE);
|
||||
break;
|
||||
break;
|
||||
case 11:
|
||||
eventProgress = 1;
|
||||
currentEvent = TYPE_NARALEX_PART2;
|
||||
instance->SetData(TYPE_NARALEX_PART2, IN_PROGRESS);
|
||||
break;
|
||||
break;
|
||||
case 19:
|
||||
DoScriptText(SAY_BEYOND_THIS_CORRIDOR, me);
|
||||
break;
|
||||
break;
|
||||
case 24:
|
||||
eventProgress = 1;
|
||||
currentEvent = TYPE_NARALEX_PART3;
|
||||
instance->SetData(TYPE_NARALEX_PART3, IN_PROGRESS);
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -76,35 +76,34 @@ class npc_torek : public CreatureScript
|
||||
uint32 Thunderclap_Timer;
|
||||
bool Completed;
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (i)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 1:
|
||||
Talk(SAY_MOVE, player->GetGUID());
|
||||
break;
|
||||
case 8:
|
||||
Talk(SAY_PREPARE, player->GetGUID());
|
||||
break;
|
||||
case 19:
|
||||
//TODO: verify location and creatures amount.
|
||||
me->SummonCreature(ENTRY_DURIEL, 1776.73f, -2049.06f, 109.83f, 1.54f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
me->SummonCreature(ENTRY_SILVERWING_SENTINEL, 1774.64f, -2049.41f, 109.83f, 1.40f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
me->SummonCreature(ENTRY_SILVERWING_WARRIOR, 1778.73f, -2049.50f, 109.83f, 1.67f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
break;
|
||||
case 20:
|
||||
DoScriptText(SAY_WIN, me, player);
|
||||
Completed = true;
|
||||
player->GroupEventHappens(QUEST_TOREK_ASSULT, me);
|
||||
break;
|
||||
case 21:
|
||||
Talk(SAY_END, player->GetGUID());
|
||||
break;
|
||||
case 1:
|
||||
Talk(SAY_MOVE, player->GetGUID());
|
||||
break;
|
||||
case 8:
|
||||
Talk(SAY_PREPARE, player->GetGUID());
|
||||
break;
|
||||
case 19:
|
||||
//TODO: verify location and creatures amount.
|
||||
me->SummonCreature(ENTRY_DURIEL, 1776.73f, -2049.06f, 109.83f, 1.54f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
me->SummonCreature(ENTRY_SILVERWING_SENTINEL, 1774.64f, -2049.41f, 109.83f, 1.40f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
me->SummonCreature(ENTRY_SILVERWING_WARRIOR, 1778.73f, -2049.50f, 109.83f, 1.67f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
break;
|
||||
case 20:
|
||||
DoScriptText(SAY_WIN, me, player);
|
||||
Completed = true;
|
||||
player->GroupEventHappens(QUEST_TOREK_ASSULT, me);
|
||||
break;
|
||||
case 21:
|
||||
Talk(SAY_END, player->GetGUID());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -182,32 +181,29 @@ class npc_ruul_snowhoof : public CreatureScript
|
||||
{
|
||||
npc_ruul_snowhoofAI(Creature* creature) : npc_escortAI(creature) { }
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (i)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 0:
|
||||
me->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
if (GameObject* Cage = me->FindNearestGameObject(GO_CAGE, 20))
|
||||
Cage->SetGoState(GO_STATE_ACTIVE);
|
||||
break;
|
||||
|
||||
case 13:
|
||||
me->SummonCreature(3922, 3449.218018f, -587.825073f, 174.978867f, 4.714445f, TEMPSUMMON_DEAD_DESPAWN, 60000);
|
||||
me->SummonCreature(3921, 3446.384521f, -587.830872f, 175.186279f, 4.714445f, TEMPSUMMON_DEAD_DESPAWN, 60000);
|
||||
me->SummonCreature(3926, 3444.218994f, -587.835327f, 175.380600f, 4.714445f, TEMPSUMMON_DEAD_DESPAWN, 60000);
|
||||
break;
|
||||
|
||||
case 19:
|
||||
me->SummonCreature(3922, 3508.344482f, -492.024261f, 186.929031f, 4.145029f, TEMPSUMMON_DEAD_DESPAWN, 60000);
|
||||
me->SummonCreature(3921, 3506.265625f, -490.531006f, 186.740128f, 4.239277f, TEMPSUMMON_DEAD_DESPAWN, 60000);
|
||||
me->SummonCreature(3926, 3503.682373f, -489.393799f, 186.629684f, 4.349232f, TEMPSUMMON_DEAD_DESPAWN, 60000);
|
||||
break;
|
||||
|
||||
case 21:
|
||||
player->GroupEventHappens(QUEST_FREEDOM_TO_RUUL, me);
|
||||
break;
|
||||
@@ -316,17 +312,19 @@ class npc_muglash : public CreatureScript
|
||||
summoned->AI()->AttackStart(me);
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
|
||||
switch (i)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 0:
|
||||
DoScriptText(SAY_MUG_START2, me, player);
|
||||
if (player)
|
||||
DoScriptText(SAY_MUG_START2, me, player);
|
||||
break;
|
||||
case 24:
|
||||
DoScriptText(SAY_MUG_BRAZIER, me, player);
|
||||
if (player)
|
||||
DoScriptText(SAY_MUG_BRAZIER, me, player);
|
||||
|
||||
if (GameObject* go = GetClosestGameObjectWithEntry(me, GO_NAGA_BRAZIER, INTERACTION_DISTANCE*2))
|
||||
{
|
||||
|
||||
@@ -374,29 +374,28 @@ public:
|
||||
{
|
||||
npc_magwinAI(Creature* creature) : npc_escortAI(creature) {}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (i)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 0:
|
||||
DoScriptText(SAY_START, me, player);
|
||||
break;
|
||||
case 17:
|
||||
DoScriptText(SAY_PROGRESS, me, player);
|
||||
break;
|
||||
case 28:
|
||||
DoScriptText(SAY_END1, me, player);
|
||||
break;
|
||||
case 29:
|
||||
DoScriptText(EMOTE_HUG, me, player);
|
||||
DoScriptText(SAY_END2, me, player);
|
||||
player->GroupEventHappens(QUEST_A_CRY_FOR_SAY_HELP, me);
|
||||
break;
|
||||
case 0:
|
||||
DoScriptText(SAY_START, me, player);
|
||||
break;
|
||||
case 17:
|
||||
DoScriptText(SAY_PROGRESS, me, player);
|
||||
break;
|
||||
case 28:
|
||||
DoScriptText(SAY_END1, me, player);
|
||||
break;
|
||||
case 29:
|
||||
DoScriptText(EMOTE_HUG, me, player);
|
||||
DoScriptText(SAY_END2, me, player);
|
||||
player->GroupEventHappens(QUEST_A_CRY_FOR_SAY_HELP, me);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -231,13 +231,13 @@ public:
|
||||
{
|
||||
npc_prospector_remtravelAI(Creature* creature) : npc_escortAI(creature) {}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (i)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 0:
|
||||
DoScriptText(SAY_REM_START, me, player);
|
||||
|
||||
@@ -228,10 +228,11 @@ public:
|
||||
{
|
||||
npc_dalindaAI(Creature* creature) : npc_escortAI(creature) { }
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
switch (i)
|
||||
|
||||
switch (waypointId)
|
||||
{
|
||||
case 1:
|
||||
me->IsStandState();
|
||||
|
||||
@@ -607,49 +607,48 @@ public:
|
||||
{
|
||||
npc_stinkyAI(Creature* creature) : npc_escortAI(creature) { }
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (i)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 7:
|
||||
DoScriptText(SAY_STAY_1, me, player);
|
||||
break;
|
||||
case 11:
|
||||
DoScriptText(SAY_STAY_2, me, player);
|
||||
break;
|
||||
case 25:
|
||||
DoScriptText(SAY_STAY_3, me, player);
|
||||
break;
|
||||
case 26:
|
||||
DoScriptText(SAY_STAY_4, me, player);
|
||||
break;
|
||||
case 27:
|
||||
DoScriptText(SAY_STAY_5, me, player);
|
||||
break;
|
||||
case 28:
|
||||
DoScriptText(SAY_STAY_6, me, player);
|
||||
me->SetStandState(UNIT_STAND_STATE_KNEEL);
|
||||
break;
|
||||
case 29:
|
||||
me->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
break;
|
||||
case 37:
|
||||
DoScriptText(SAY_QUEST_COMPLETE, me, player);
|
||||
me->SetSpeed(MOVE_RUN, 1.2f, true);
|
||||
me->SetWalk(false);
|
||||
if (player->GetQuestStatus(QUEST_STINKYS_ESCAPE_H))
|
||||
player->GroupEventHappens(QUEST_STINKYS_ESCAPE_H, me);
|
||||
if (player->GetQuestStatus(QUEST_STINKYS_ESCAPE_A))
|
||||
player->GroupEventHappens(QUEST_STINKYS_ESCAPE_A, me);
|
||||
break;
|
||||
case 39:
|
||||
DoScriptText(EMOTE_DISAPPEAR, me);
|
||||
break;
|
||||
|
||||
case 7:
|
||||
DoScriptText(SAY_STAY_1, me, player);
|
||||
break;
|
||||
case 11:
|
||||
DoScriptText(SAY_STAY_2, me, player);
|
||||
break;
|
||||
case 25:
|
||||
DoScriptText(SAY_STAY_3, me, player);
|
||||
break;
|
||||
case 26:
|
||||
DoScriptText(SAY_STAY_4, me, player);
|
||||
break;
|
||||
case 27:
|
||||
DoScriptText(SAY_STAY_5, me, player);
|
||||
break;
|
||||
case 28:
|
||||
DoScriptText(SAY_STAY_6, me, player);
|
||||
me->SetStandState(UNIT_STAND_STATE_KNEEL);
|
||||
break;
|
||||
case 29:
|
||||
me->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
break;
|
||||
case 37:
|
||||
DoScriptText(SAY_QUEST_COMPLETE, me, player);
|
||||
me->SetSpeed(MOVE_RUN, 1.2f, true);
|
||||
me->SetWalk(false);
|
||||
if (player->GetQuestStatus(QUEST_STINKYS_ESCAPE_H))
|
||||
player->GroupEventHappens(QUEST_STINKYS_ESCAPE_H, me);
|
||||
if (player->GetQuestStatus(QUEST_STINKYS_ESCAPE_A))
|
||||
player->GroupEventHappens(QUEST_STINKYS_ESCAPE_A, me);
|
||||
break;
|
||||
case 39:
|
||||
DoScriptText(EMOTE_DISAPPEAR, me);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -124,9 +124,9 @@ public:
|
||||
{
|
||||
npc_oox22feAI(Creature* creature) : npc_escortAI(creature) { }
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
switch (i)
|
||||
switch (waypointId)
|
||||
{
|
||||
// First Ambush(3 Yetis)
|
||||
case 11:
|
||||
|
||||
@@ -537,9 +537,9 @@ public:
|
||||
} else if (Event_onWait) Event_Timer -= diff;
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 id)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
CurrWP = id;
|
||||
CurrWP = waypointId;
|
||||
Event_Timer = 0;
|
||||
Step = 0;
|
||||
Event_onWait = true;
|
||||
|
||||
@@ -114,14 +114,13 @@ public:
|
||||
{
|
||||
npc_kaya_flathoofAI(Creature* creature) : npc_escortAI(creature) {}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (i)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 16:
|
||||
DoScriptText(SAY_AMBUSH, me);
|
||||
@@ -129,7 +128,6 @@ public:
|
||||
me->SummonCreature(NPC_GRIMTOTEM_RUFFIAN, -38.85f, -503.77f, -45.90f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
|
||||
me->SummonCreature(NPC_GRIMTOTEM_SORCERER, -36.37f, -496.23f, -45.71f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
|
||||
break;
|
||||
|
||||
case 18:
|
||||
me->SetInFront(player);
|
||||
DoScriptText(SAY_END, me, player);
|
||||
|
||||
@@ -172,31 +172,65 @@ public:
|
||||
{
|
||||
npc_custodian_of_timeAI(Creature* creature) : npc_escortAI(creature) {}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (i)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 0: DoScriptText(WHISPER_CUSTODIAN_1, me, player); break;
|
||||
case 1: DoScriptText(WHISPER_CUSTODIAN_2, me, player); break;
|
||||
case 2: DoScriptText(WHISPER_CUSTODIAN_3, me, player); break;
|
||||
case 3: DoScriptText(WHISPER_CUSTODIAN_4, me, player); break;
|
||||
case 5: DoScriptText(WHISPER_CUSTODIAN_5, me, player); break;
|
||||
case 6: DoScriptText(WHISPER_CUSTODIAN_6, me, player); break;
|
||||
case 7: DoScriptText(WHISPER_CUSTODIAN_7, me, player); break;
|
||||
case 8: DoScriptText(WHISPER_CUSTODIAN_8, me, player); break;
|
||||
case 9: DoScriptText(WHISPER_CUSTODIAN_9, me, player); break;
|
||||
case 10: DoScriptText(WHISPER_CUSTODIAN_4, me, player); break;
|
||||
case 13: DoScriptText(WHISPER_CUSTODIAN_10, me, player); break;
|
||||
case 14: DoScriptText(WHISPER_CUSTODIAN_4, me, player); break;
|
||||
case 16: DoScriptText(WHISPER_CUSTODIAN_11, me, player); break;
|
||||
case 17: DoScriptText(WHISPER_CUSTODIAN_12, me, player); break;
|
||||
case 18: DoScriptText(WHISPER_CUSTODIAN_4, me, player); break;
|
||||
case 22: DoScriptText(WHISPER_CUSTODIAN_13, me, player); break;
|
||||
case 23: DoScriptText(WHISPER_CUSTODIAN_4, me, player); break;
|
||||
case 0:
|
||||
DoScriptText(WHISPER_CUSTODIAN_1, me, player);
|
||||
break;
|
||||
case 1:
|
||||
DoScriptText(WHISPER_CUSTODIAN_2, me, player);
|
||||
break;
|
||||
case 2:
|
||||
DoScriptText(WHISPER_CUSTODIAN_3, me, player);
|
||||
break;
|
||||
case 3:
|
||||
DoScriptText(WHISPER_CUSTODIAN_4, me, player);
|
||||
break;
|
||||
case 5:
|
||||
DoScriptText(WHISPER_CUSTODIAN_5, me, player);
|
||||
break;
|
||||
case 6:
|
||||
DoScriptText(WHISPER_CUSTODIAN_6, me, player);
|
||||
break;
|
||||
case 7:
|
||||
DoScriptText(WHISPER_CUSTODIAN_7, me, player);
|
||||
break;
|
||||
case 8:
|
||||
DoScriptText(WHISPER_CUSTODIAN_8, me, player);
|
||||
break;
|
||||
case 9:
|
||||
DoScriptText(WHISPER_CUSTODIAN_9, me, player);
|
||||
break;
|
||||
case 10:
|
||||
DoScriptText(WHISPER_CUSTODIAN_4, me, player);
|
||||
break;
|
||||
case 13:
|
||||
DoScriptText(WHISPER_CUSTODIAN_10, me, player);
|
||||
break;
|
||||
case 14:
|
||||
DoScriptText(WHISPER_CUSTODIAN_4, me, player);
|
||||
break;
|
||||
case 16:
|
||||
DoScriptText(WHISPER_CUSTODIAN_11, me, player);
|
||||
break;
|
||||
case 17:
|
||||
DoScriptText(WHISPER_CUSTODIAN_12, me, player);
|
||||
break;
|
||||
case 18:
|
||||
DoScriptText(WHISPER_CUSTODIAN_4, me, player);
|
||||
break;
|
||||
case 22:
|
||||
DoScriptText(WHISPER_CUSTODIAN_13, me, player);
|
||||
break;
|
||||
case 23:
|
||||
DoScriptText(WHISPER_CUSTODIAN_4, me, player);
|
||||
break;
|
||||
case 24:
|
||||
DoScriptText(WHISPER_CUSTODIAN_14, me, player);
|
||||
DoCast(player, 34883);
|
||||
@@ -428,14 +462,13 @@ public:
|
||||
{
|
||||
npc_OOX17AI(Creature* creature) : npc_escortAI(creature) {}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (i)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 23:
|
||||
me->SummonCreature(SPAWN_FIRST, -8350.96f, -4445.79f, 10.10f, 6.20f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
@@ -443,7 +476,6 @@ public:
|
||||
me->SummonCreature(SPAWN_FIRST, -8353.96f, -4442.79f, 10.10f, 6.08f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
DoScriptText(SAY_OOX_AMBUSH, me);
|
||||
break;
|
||||
|
||||
case 56:
|
||||
me->SummonCreature(SPAWN_SECOND_1, -7510.07f, -4795.50f, 9.35f, 6.06f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
me->SummonCreature(SPAWN_SECOND_2, -7515.07f, -4797.50f, 9.35f, 6.22f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
@@ -452,7 +484,6 @@ public:
|
||||
if (Unit* scoff = me->FindNearestCreature(SPAWN_SECOND_2, 30))
|
||||
DoScriptText(SAY_OOX17_AMBUSH_REPLY, scoff);
|
||||
break;
|
||||
|
||||
case 86:
|
||||
DoScriptText(SAY_OOX_END, me);
|
||||
player->GroupEventHappens(Q_OOX17, me);
|
||||
|
||||
@@ -127,14 +127,13 @@ public:
|
||||
|
||||
void Reset() { }
|
||||
|
||||
void WaypointReached(uint32 uiPointId)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (uiPointId)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 16:
|
||||
DoScriptText(SAY_GIL_AT_LAST, me, player);
|
||||
@@ -593,26 +592,26 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 uiPointId)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
switch (uiPointId)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 0:
|
||||
DoScriptText(SAY_STARTUP1, me);
|
||||
break;
|
||||
case 9:
|
||||
SetRun(false);
|
||||
break;
|
||||
case 17:
|
||||
if (Creature* temp = me->SummonCreature(NPC_MERCENARY, 1128.489f, -3037.611f, 92.701f, 1.472f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000))
|
||||
{
|
||||
DoScriptText(SAY_MERCENARY, temp);
|
||||
me->SummonCreature(NPC_MERCENARY, 1160.172f, -2980.168f, 97.313f, 3.690f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
|
||||
}
|
||||
break;
|
||||
case 24:
|
||||
m_bIsPostEvent = true;
|
||||
break;
|
||||
case 0:
|
||||
DoScriptText(SAY_STARTUP1, me);
|
||||
break;
|
||||
case 9:
|
||||
SetRun(false);
|
||||
break;
|
||||
case 17:
|
||||
if (Creature* temp = me->SummonCreature(NPC_MERCENARY, 1128.489f, -3037.611f, 92.701f, 1.472f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000))
|
||||
{
|
||||
DoScriptText(SAY_MERCENARY, temp);
|
||||
me->SummonCreature(NPC_MERCENARY, 1160.172f, -2980.168f, 97.313f, 3.690f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
|
||||
}
|
||||
break;
|
||||
case 24:
|
||||
m_bIsPostEvent = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -75,9 +75,9 @@ public:
|
||||
|
||||
void Reset() { }
|
||||
|
||||
void WaypointReached(uint32 uiPointId)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
switch (uiPointId)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 0:
|
||||
DoScriptText(SAY_KAN_START, me);
|
||||
@@ -166,9 +166,9 @@ public:
|
||||
|
||||
void Reset() { }
|
||||
|
||||
void WaypointReached(uint32 uiPointId)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
switch (uiPointId)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 8:
|
||||
DoScriptText(SAY_LAKO_LOOK_OUT, me);
|
||||
@@ -251,9 +251,9 @@ public:
|
||||
|
||||
void Reset() { }
|
||||
|
||||
void WaypointReached(uint32 uiPointId)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
switch (uiPointId)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 15:
|
||||
DoScriptText(SAY_WYVERN, me);
|
||||
|
||||
@@ -78,14 +78,13 @@ public:
|
||||
|
||||
uint32 DEMORALIZINGSHOUT_Timer;
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (i)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 19:
|
||||
me->SummonCreature(ENTRY_STOMPER, -6391.69f, -1730.49f, -272.83f, 4.96f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
|
||||
+2
-2
@@ -227,9 +227,9 @@ class npc_onyx_flamecaller : public CreatureScript
|
||||
zarithrian->AI()->JustSummoned(me);
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 pointId)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
if (pointId == MAX_PATH_FLAMECALLER_WAYPOINTS || pointId == MAX_PATH_FLAMECALLER_WAYPOINTS*2)
|
||||
if (waypointId == MAX_PATH_FLAMECALLER_WAYPOINTS || waypointId == MAX_PATH_FLAMECALLER_WAYPOINTS*2)
|
||||
{
|
||||
DoZoneInCombat();
|
||||
SetEscortPaused(true);
|
||||
|
||||
+2
-2
@@ -447,9 +447,9 @@ public:
|
||||
|
||||
uint8 uiWaypoint;
|
||||
|
||||
void WaypointReached(uint32 uiPoint)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
if (uiPoint == 0)
|
||||
if (waypointId == 0)
|
||||
{
|
||||
switch (uiWaypoint)
|
||||
{
|
||||
|
||||
+1
-1
@@ -356,7 +356,7 @@ public:
|
||||
Start(false, true, 0, NULL);
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 /*i*/)
|
||||
void WaypointReached(uint32 /*waypointId*/)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
+7
-5
@@ -203,17 +203,19 @@ public:
|
||||
Start(false, true, 0, NULL);
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
switch (i)
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
switch (waypointId)
|
||||
{
|
||||
case 2:
|
||||
if (instance && (uiWaypointPath == 3 || uiWaypointPath == 2))
|
||||
if (uiWaypointPath == 3 || uiWaypointPath == 2)
|
||||
instance->SetData(DATA_MOVEMENT_DONE, instance->GetData(DATA_MOVEMENT_DONE)+1);
|
||||
break;
|
||||
case 3:
|
||||
if (instance)
|
||||
instance->SetData(DATA_MOVEMENT_DONE, instance->GetData(DATA_MOVEMENT_DONE)+1);
|
||||
instance->SetData(DATA_MOVEMENT_DONE, instance->GetData(DATA_MOVEMENT_DONE)+1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -963,8 +963,9 @@ public:
|
||||
// we dont do melee damage!
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 /*i*/)
|
||||
void WaypointReached(uint32 /*waypointId*/)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -346,9 +346,9 @@ public:
|
||||
lDwarfGUIDList.clear();
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 uiPointId)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
switch (uiPointId)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 7:
|
||||
if (Creature* creature = GetClosestCreatureWithEntry(me, CREATURE_TRIBUNAL_OF_THE_AGES, 100.0f))
|
||||
|
||||
@@ -964,8 +964,9 @@ public:
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 /*i*/)
|
||||
void WaypointReached(uint32 /*waypointId*/)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void Reset()
|
||||
|
||||
@@ -447,32 +447,32 @@ public:
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 uiWPointId)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
switch (uiBoss)
|
||||
{
|
||||
case 1:
|
||||
if (uiWPointId == 2)
|
||||
if (waypointId == 2)
|
||||
FinishPointReached();
|
||||
break;
|
||||
case 2:
|
||||
if (uiWPointId == 2)
|
||||
if (waypointId == 2)
|
||||
FinishPointReached();
|
||||
break;
|
||||
case 3:
|
||||
if (uiWPointId == 1)
|
||||
if (waypointId == 1)
|
||||
FinishPointReached();
|
||||
break;
|
||||
case 4:
|
||||
if (uiWPointId == 0)
|
||||
if (waypointId == 0)
|
||||
FinishPointReached();
|
||||
break;
|
||||
case 5:
|
||||
if (uiWPointId == 0)
|
||||
if (waypointId == 0)
|
||||
FinishPointReached();
|
||||
break;
|
||||
case 6:
|
||||
if (uiWPointId == 4)
|
||||
if (waypointId == 4)
|
||||
FinishPointReached();
|
||||
break;
|
||||
}
|
||||
@@ -690,32 +690,32 @@ struct violet_hold_trashAI : public npc_escortAI
|
||||
uint32 portalLocationID;
|
||||
uint32 secondPortalRouteID;
|
||||
|
||||
void WaypointReached(uint32 uiPointId)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
switch (portalLocationID)
|
||||
{
|
||||
case 0:
|
||||
if (uiPointId == 5)
|
||||
if (waypointId == 5)
|
||||
CreatureStartAttackDoor();
|
||||
break;
|
||||
case 1:
|
||||
if ((uiPointId == 8 && secondPortalRouteID == 0) || (uiPointId == 7 && secondPortalRouteID == 1))
|
||||
if ((waypointId == 8 && secondPortalRouteID == 0) || (waypointId == 7 && secondPortalRouteID == 1))
|
||||
CreatureStartAttackDoor();
|
||||
break;
|
||||
case 2:
|
||||
if (uiPointId == 7)
|
||||
if (waypointId == 7)
|
||||
CreatureStartAttackDoor();
|
||||
break;
|
||||
case 3:
|
||||
if (uiPointId == 8)
|
||||
if (waypointId == 8)
|
||||
CreatureStartAttackDoor();
|
||||
break;
|
||||
case 4:
|
||||
if (uiPointId == 5)
|
||||
if (waypointId == 5)
|
||||
CreatureStartAttackDoor();
|
||||
break;
|
||||
case 5:
|
||||
if (uiPointId == 3)
|
||||
if (waypointId == 3)
|
||||
CreatureStartAttackDoor();
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -716,9 +716,9 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
switch (i)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 0:
|
||||
IntroPhase = 1;
|
||||
@@ -1012,13 +1012,13 @@ public:
|
||||
uiPhaseTimer = 0;
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 uiPointId)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (uiPointId)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 3:
|
||||
SetEscortPaused(true);
|
||||
@@ -1038,7 +1038,6 @@ public:
|
||||
}
|
||||
me->SetWalk(false);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
SetEscortPaused(true);
|
||||
uiPhase = 7;
|
||||
@@ -1851,34 +1850,33 @@ public:
|
||||
player->FailQuest(QUEST_ESCAPING_THE_MIST);
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (i)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 10:
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION);
|
||||
DoScriptText(SAY_2, me);
|
||||
break;
|
||||
case 12:
|
||||
DoScriptText(SAY_3, me);
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_LOOT);
|
||||
break;
|
||||
case 16:
|
||||
DoScriptText(SAY_4, me);
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION);
|
||||
break;
|
||||
case 20:
|
||||
me->SetPhaseMask(1, true);
|
||||
DoScriptText(SAY_5, me);
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION);
|
||||
player->GroupEventHappens(QUEST_ESCAPING_THE_MIST, me);
|
||||
SetRun(true);
|
||||
break;
|
||||
case 10:
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION);
|
||||
DoScriptText(SAY_2, me);
|
||||
break;
|
||||
case 12:
|
||||
DoScriptText(SAY_3, me);
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_LOOT);
|
||||
break;
|
||||
case 16:
|
||||
DoScriptText(SAY_4, me);
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION);
|
||||
break;
|
||||
case 20:
|
||||
me->SetPhaseMask(1, true);
|
||||
DoScriptText(SAY_5, me);
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION);
|
||||
player->GroupEventHappens(QUEST_ESCAPING_THE_MIST, me);
|
||||
SetRun(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -1951,14 +1949,13 @@ public:
|
||||
else Bonker_agro=0;
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (i)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 29:
|
||||
player->GroupEventHappens(QUEST_GET_ME_OUTA_HERE, me);
|
||||
|
||||
@@ -74,13 +74,13 @@ public:
|
||||
summoned->AI()->AttackStart(me->getVictim());
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (i)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 9:
|
||||
if (Creature* Mrfloppy = GetClosestCreatureWithEntry(me, NPC_MRFLOPPY, 100.0f))
|
||||
|
||||
@@ -97,13 +97,13 @@ public:
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (i)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 1:
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
|
||||
@@ -70,39 +70,40 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (i)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 1: SetRun(); break;
|
||||
case 10:
|
||||
case 11:
|
||||
case 12:
|
||||
case 13:
|
||||
case 14:
|
||||
case 15:
|
||||
case 16:
|
||||
case 17:
|
||||
case 18:
|
||||
me->RemoveUnitMovementFlag(MOVEMENTFLAG_SWIMMING);
|
||||
me->RemoveUnitMovementFlag(MOVEMENTFLAG_FALLING);
|
||||
me->SetSpeed(MOVE_SWIM, 0.85f, true);
|
||||
me->AddUnitMovementFlag(MOVEMENTFLAG_SWIMMING | MOVEMENTFLAG_DISABLE_GRAVITY);
|
||||
break;
|
||||
case 19:
|
||||
me->SetUnitMovementFlags(MOVEMENTFLAG_FALLING);
|
||||
break;
|
||||
case 28:
|
||||
player->GroupEventHappens(QUEST_FORTUNATE_MISUNDERSTANDINGS, me);
|
||||
// me->RestoreFaction();
|
||||
DoScriptText(SAY_END_IRO, me);
|
||||
SetRun(false);
|
||||
break;
|
||||
case 1:
|
||||
SetRun();
|
||||
break;
|
||||
case 10:
|
||||
case 11:
|
||||
case 12:
|
||||
case 13:
|
||||
case 14:
|
||||
case 15:
|
||||
case 16:
|
||||
case 17:
|
||||
case 18:
|
||||
me->RemoveUnitMovementFlag(MOVEMENTFLAG_SWIMMING);
|
||||
me->RemoveUnitMovementFlag(MOVEMENTFLAG_FALLING);
|
||||
me->SetSpeed(MOVE_SWIM, 0.85f, true);
|
||||
me->AddUnitMovementFlag(MOVEMENTFLAG_SWIMMING | MOVEMENTFLAG_DISABLE_GRAVITY);
|
||||
break;
|
||||
case 19:
|
||||
me->SetUnitMovementFlags(MOVEMENTFLAG_FALLING);
|
||||
break;
|
||||
case 28:
|
||||
player->GroupEventHappens(QUEST_FORTUNATE_MISUNDERSTANDINGS, me);
|
||||
// me->RestoreFaction();
|
||||
DoScriptText(SAY_END_IRO, me);
|
||||
SetRun(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -359,10 +360,11 @@ public:
|
||||
|
||||
uint32 m_uiChatTimer;
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
switch (i)
|
||||
|
||||
switch (waypointId)
|
||||
{
|
||||
case 0:
|
||||
DoScriptText(SAY_WP_2, me);
|
||||
|
||||
@@ -374,18 +374,17 @@ public:
|
||||
{
|
||||
npc_injured_goblinAI(Creature* creature) : npc_escortAI(creature) { }
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (i)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 26:
|
||||
DoScriptText(SAY_END_WP_REACHED, me, player);
|
||||
break;
|
||||
|
||||
case 27:
|
||||
player->GroupEventHappens(QUEST_BITTER_DEPARTURE, me);
|
||||
break;
|
||||
@@ -672,7 +671,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 /*wp*/)
|
||||
void WaypointReached(uint32 /*waypointId*/)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -740,9 +740,9 @@ public:
|
||||
bEnrage = false;
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 uiI)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
switch (uiI)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 6:
|
||||
me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0);
|
||||
@@ -934,9 +934,9 @@ public:
|
||||
bThunderClap = false;
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 uiI)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
switch (uiI)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 7:
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
|
||||
|
||||
@@ -102,7 +102,7 @@ public:
|
||||
npc_escortAI::MoveInLineOfSight(who);
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 /*i*/)
|
||||
void WaypointReached(uint32 /*waypointId*/)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -180,9 +180,9 @@ public:
|
||||
npc_escortAI::MoveInLineOfSight(who);
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 uiPointId)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
switch (uiPointId)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 0:
|
||||
DoScriptText(EMOTE_WOLF_LIFT_HEAD, me);
|
||||
@@ -402,38 +402,37 @@ public:
|
||||
{
|
||||
npc_wounded_blood_elfAI(Creature* creature) : npc_escortAI(creature) {}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (i)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 0:
|
||||
DoScriptText(SAY_ELF_START, me, player);
|
||||
break;
|
||||
case 9:
|
||||
DoScriptText(SAY_ELF_SUMMON1, me, player);
|
||||
// Spawn two Haal'eshi Talonguard
|
||||
DoSpawnCreature(16967, -15, -15, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
DoSpawnCreature(16967, -17, -17, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
break;
|
||||
case 13:
|
||||
DoScriptText(SAY_ELF_RESTING, me, player);
|
||||
break;
|
||||
case 14:
|
||||
DoScriptText(SAY_ELF_SUMMON2, me, player);
|
||||
// Spawn two Haal'eshi Windwalker
|
||||
DoSpawnCreature(16966, -15, -15, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
DoSpawnCreature(16966, -17, -17, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
break;
|
||||
case 27:
|
||||
DoScriptText(SAY_ELF_COMPLETE, me, player);
|
||||
// Award quest credit
|
||||
player->GroupEventHappens(QUEST_ROAD_TO_FALCON_WATCH, me);
|
||||
break;
|
||||
case 0:
|
||||
DoScriptText(SAY_ELF_START, me, player);
|
||||
break;
|
||||
case 9:
|
||||
DoScriptText(SAY_ELF_SUMMON1, me, player);
|
||||
// Spawn two Haal'eshi Talonguard
|
||||
DoSpawnCreature(16967, -15, -15, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
DoSpawnCreature(16967, -17, -17, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
break;
|
||||
case 13:
|
||||
DoScriptText(SAY_ELF_RESTING, me, player);
|
||||
break;
|
||||
case 14:
|
||||
DoScriptText(SAY_ELF_SUMMON2, me, player);
|
||||
// Spawn two Haal'eshi Windwalker
|
||||
DoSpawnCreature(16966, -15, -15, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
DoSpawnCreature(16966, -17, -17, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
break;
|
||||
case 27:
|
||||
DoScriptText(SAY_ELF_COMPLETE, me, player);
|
||||
// Award quest credit
|
||||
player->GroupEventHappens(QUEST_ROAD_TO_FALCON_WATCH, me);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -221,9 +221,9 @@ public:
|
||||
DoCast(me, SPELL_EARTHBIND_TOTEM, false);
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 uiPointId)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
switch (uiPointId)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 7:
|
||||
DoScriptText(SAY_MAG_MORE, me);
|
||||
@@ -565,9 +565,9 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 PointId)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
switch(PointId)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 3:
|
||||
{
|
||||
|
||||
@@ -889,33 +889,32 @@ public:
|
||||
player->FailQuest(Q_ALMABTRIEB);
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (i)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 3: //first spawn
|
||||
me->SummonCreature(SPAWN_FIRST, 2449.67f, 2183.11f, 96.85f, 6.20f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
me->SummonCreature(SPAWN_FIRST, 2449.53f, 2184.43f, 96.36f, 6.27f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
me->SummonCreature(SPAWN_FIRST, 2449.85f, 2186.34f, 97.57f, 6.08f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
break;
|
||||
|
||||
case 7:
|
||||
me->SummonCreature(SPAWN_SECOND, 2309.64f, 2186.24f, 92.25f, 6.06f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
me->SummonCreature(SPAWN_SECOND, 2309.25f, 2183.46f, 91.75f, 6.22f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
break;
|
||||
|
||||
case 12:
|
||||
player->GroupEventHappens(Q_ALMABTRIEB, me);
|
||||
if (me->FindNearestCreature(N_THADELL, 30))
|
||||
DoScriptText(SAY_THADELL_1, me); break;
|
||||
DoScriptText(SAY_THADELL_1, me);
|
||||
break;
|
||||
case 13:
|
||||
if (me->FindNearestCreature(N_THADELL, 30))
|
||||
DoScriptText(SAY_THADELL_2, me, player); break;
|
||||
DoScriptText(SAY_THADELL_2, me, player);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -964,13 +963,13 @@ public:
|
||||
uiTakeTimer=3000;
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (i)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 7:
|
||||
case 17:
|
||||
|
||||
@@ -1054,14 +1054,13 @@ public:
|
||||
m_uiHealingTimer = 0;
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 uiPointId)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (uiPointId)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 13:
|
||||
DoScriptText(SAY_WIL_PROGRESS1, me, player);
|
||||
|
||||
@@ -319,36 +319,77 @@ public:
|
||||
public:
|
||||
npc_kservantAI(Creature* creature) : npc_escortAI(creature) {}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (i)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 0: DoScriptText(SAY1, me, player); break;
|
||||
case 4: DoScriptText(WHISP1, me, player); break;
|
||||
case 6: DoScriptText(WHISP2, me, player); break;
|
||||
case 7: DoScriptText(WHISP3, me, player); break;
|
||||
case 8: DoScriptText(WHISP4, me, player); break;
|
||||
case 17: DoScriptText(WHISP5, me, player); break;
|
||||
case 18: DoScriptText(WHISP6, me, player); break;
|
||||
case 19: DoScriptText(WHISP7, me, player); break;
|
||||
case 33: DoScriptText(WHISP8, me, player); break;
|
||||
case 34: DoScriptText(WHISP9, me, player); break;
|
||||
case 35: DoScriptText(WHISP10, me, player); break;
|
||||
case 36: DoScriptText(WHISP11, me, player); break;
|
||||
case 43: DoScriptText(WHISP12, me, player); break;
|
||||
case 44: DoScriptText(WHISP13, me, player); break;
|
||||
case 49: DoScriptText(WHISP14, me, player); break;
|
||||
case 50: DoScriptText(WHISP15, me, player); break;
|
||||
case 51: DoScriptText(WHISP16, me, player); break;
|
||||
case 52: DoScriptText(WHISP17, me, player); break;
|
||||
case 53: DoScriptText(WHISP18, me, player); break;
|
||||
case 54: DoScriptText(WHISP19, me, player); break;
|
||||
case 55: DoScriptText(WHISP20, me, player); break;
|
||||
case 0:
|
||||
DoScriptText(SAY1, me, player);
|
||||
break;
|
||||
case 4:
|
||||
DoScriptText(WHISP1, me, player);
|
||||
break;
|
||||
case 6:
|
||||
DoScriptText(WHISP2, me, player);
|
||||
break;
|
||||
case 7:
|
||||
DoScriptText(WHISP3, me, player);
|
||||
break;
|
||||
case 8:
|
||||
DoScriptText(WHISP4, me, player);
|
||||
break;
|
||||
case 17:
|
||||
DoScriptText(WHISP5, me, player);
|
||||
break;
|
||||
case 18:
|
||||
DoScriptText(WHISP6, me, player);
|
||||
break;
|
||||
case 19:
|
||||
DoScriptText(WHISP7, me, player);
|
||||
break;
|
||||
case 33:
|
||||
DoScriptText(WHISP8, me, player);
|
||||
break;
|
||||
case 34:
|
||||
DoScriptText(WHISP9, me, player);
|
||||
break;
|
||||
case 35:
|
||||
DoScriptText(WHISP10, me, player);
|
||||
break;
|
||||
case 36:
|
||||
DoScriptText(WHISP11, me, player);
|
||||
break;
|
||||
case 43:
|
||||
DoScriptText(WHISP12, me, player);
|
||||
break;
|
||||
case 44:
|
||||
DoScriptText(WHISP13, me, player);
|
||||
break;
|
||||
case 49:
|
||||
DoScriptText(WHISP14, me, player);
|
||||
break;
|
||||
case 50:
|
||||
DoScriptText(WHISP15, me, player);
|
||||
break;
|
||||
case 51:
|
||||
DoScriptText(WHISP16, me, player);
|
||||
break;
|
||||
case 52:
|
||||
DoScriptText(WHISP17, me, player);
|
||||
break;
|
||||
case 53:
|
||||
DoScriptText(WHISP18, me, player);
|
||||
break;
|
||||
case 54:
|
||||
DoScriptText(WHISP19, me, player);
|
||||
break;
|
||||
case 55:
|
||||
DoScriptText(WHISP20, me, player);
|
||||
break;
|
||||
case 56:
|
||||
DoScriptText(WHISP21, me, player);
|
||||
player->GroupEventHappens(10211, me);
|
||||
|
||||
@@ -202,13 +202,13 @@ public:
|
||||
public:
|
||||
npc_skywingAI(Creature* creature) : npc_escortAI(creature) {}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (i)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 8:
|
||||
player->AreaExploredOrEventHappens(10898);
|
||||
@@ -461,32 +461,27 @@ public:
|
||||
{
|
||||
npc_isla_starmaneAI(Creature* creature) : npc_escortAI(creature) {}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (i)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 0:
|
||||
if (GameObject* Cage = me->FindNearestGameObject(GO_CAGE, 10))
|
||||
Cage->SetGoState(GO_STATE_ACTIVE);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
DoScriptText(SAY_PROGRESS_1, me, player);
|
||||
break;
|
||||
|
||||
case 5:
|
||||
DoScriptText(SAY_PROGRESS_2, me, player);
|
||||
break;
|
||||
|
||||
case 6:
|
||||
DoScriptText(SAY_PROGRESS_3, me, player);
|
||||
break;
|
||||
|
||||
case 29:
|
||||
DoScriptText(SAY_PROGRESS_4, me, player);
|
||||
if (player->GetTeam() == ALLIANCE)
|
||||
@@ -495,11 +490,9 @@ public:
|
||||
player->GroupEventHappens(QUEST_EFTW_H, me);
|
||||
me->SetInFront(player);
|
||||
break;
|
||||
|
||||
case 30:
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_WAVE);
|
||||
break;
|
||||
|
||||
case 31:
|
||||
DoCast(me, SPELL_CAT);
|
||||
me->SetWalk(false);
|
||||
@@ -673,14 +666,13 @@ public:
|
||||
{
|
||||
npc_akunoAI(Creature* creature) : npc_escortAI(creature) {}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (i)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 3:
|
||||
me->SummonCreature(NPC_CABAL_SKRIMISHER, -2795.99f, 5420.33f, -34.53f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
|
||||
@@ -322,14 +322,13 @@ public:
|
||||
|
||||
void Reset() { }
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (i)
|
||||
switch (waypointId)
|
||||
{
|
||||
case 4:
|
||||
DoScriptText(SAY_AMBUSH1, me, player);
|
||||
|
||||
@@ -1040,8 +1040,9 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 /*point*/)
|
||||
void WaypointReached(uint32 /*waypointId*/)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 const diff)
|
||||
|
||||
@@ -38,11 +38,11 @@ Log::Log() :
|
||||
|
||||
Log::~Log()
|
||||
{
|
||||
if ( logfile != NULL )
|
||||
if (logfile != NULL)
|
||||
fclose(logfile);
|
||||
logfile = NULL;
|
||||
|
||||
if ( gmLogfile != NULL )
|
||||
if (gmLogfile != NULL)
|
||||
fclose(gmLogfile);
|
||||
gmLogfile = NULL;
|
||||
|
||||
@@ -50,7 +50,7 @@ Log::~Log()
|
||||
fclose(charLogfile);
|
||||
charLogfile = NULL;
|
||||
|
||||
if ( dberLogfile != NULL )
|
||||
if (dberLogfile != NULL)
|
||||
fclose(dberLogfile);
|
||||
dberLogfile = NULL;
|
||||
|
||||
@@ -81,32 +81,32 @@ Log::~Log()
|
||||
|
||||
void Log::SetLogLevel(char *Level)
|
||||
{
|
||||
int32 NewLevel =atoi((char*)Level);
|
||||
if ( NewLevel <0 )
|
||||
int32 NewLevel = atoi((char*)Level);
|
||||
if (NewLevel < 0)
|
||||
NewLevel = 0;
|
||||
m_logLevel = NewLevel;
|
||||
|
||||
outString( "LogLevel is %u", m_logLevel );
|
||||
outString("LogLevel is %u", m_logLevel);
|
||||
}
|
||||
|
||||
void Log::SetLogFileLevel(char *Level)
|
||||
{
|
||||
int32 NewLevel =atoi((char*)Level);
|
||||
if ( NewLevel <0 )
|
||||
int32 NewLevel = atoi((char*)Level);
|
||||
if (NewLevel < 0)
|
||||
NewLevel = 0;
|
||||
m_logFileLevel = NewLevel;
|
||||
|
||||
outString( "LogFileLevel is %u", m_logFileLevel );
|
||||
outString("LogFileLevel is %u", m_logFileLevel);
|
||||
}
|
||||
|
||||
void Log::SetDBLogLevel(char *Level)
|
||||
{
|
||||
int32 NewLevel = atoi((char*)Level);
|
||||
if ( NewLevel < 0 )
|
||||
if (NewLevel < 0)
|
||||
NewLevel = 0;
|
||||
m_dbLogLevel = NewLevel;
|
||||
|
||||
outString( "DBLogLevel is %u", m_dbLogLevel );
|
||||
outString("DBLogLevel is %u", m_dbLogLevel);
|
||||
}
|
||||
|
||||
void Log::Initialize()
|
||||
|
||||
@@ -117,28 +117,28 @@ class Log
|
||||
void SetColor(bool stdout_stream, ColorTypes color);
|
||||
void ResetColor(bool stdout_stream);
|
||||
|
||||
void outErrorST( const char * err, ... ) ATTR_PRINTF(2, 3);
|
||||
void outDB( LogTypes type, const char * str );
|
||||
void outString( const char * str, ... ) ATTR_PRINTF(2, 3);
|
||||
void outString( );
|
||||
void outStringInLine( const char * str, ... ) ATTR_PRINTF(2, 3);
|
||||
void outError( const char * err, ... ) ATTR_PRINTF(2, 3);
|
||||
void outCrash( const char * err, ... ) ATTR_PRINTF(2, 3);
|
||||
void outBasic( const char * str, ... ) ATTR_PRINTF(2, 3);
|
||||
void outDetail( const char * str, ... ) ATTR_PRINTF(2, 3);
|
||||
void outSQLDev( const char * str, ... ) ATTR_PRINTF(2, 3);
|
||||
void outErrorST(const char * err, ...) ATTR_PRINTF(2, 3);
|
||||
void outDB(LogTypes type, const char * str);
|
||||
void outString(const char * str, ...) ATTR_PRINTF(2, 3);
|
||||
void outString();
|
||||
void outStringInLine(const char * str, ...) ATTR_PRINTF(2, 3);
|
||||
void outError(const char * err, ...) ATTR_PRINTF(2, 3);
|
||||
void outCrash(const char * err, ...) ATTR_PRINTF(2, 3);
|
||||
void outBasic(const char * str, ...) ATTR_PRINTF(2, 3);
|
||||
void outDetail(const char * str, ...) ATTR_PRINTF(2, 3);
|
||||
void outSQLDev(const char * str, ...) ATTR_PRINTF(2, 3);
|
||||
void outDebug(DebugLogFilters f, const char* str, ...) ATTR_PRINTF(3, 4);
|
||||
void outStaticDebug( const char * str, ... ) ATTR_PRINTF(2, 3);
|
||||
void outDebugInLine( const char * str, ... ) ATTR_PRINTF(2, 3);
|
||||
void outErrorDb( const char * str, ... ) ATTR_PRINTF(2, 3);
|
||||
void outChar( const char * str, ... ) ATTR_PRINTF(2, 3);
|
||||
void outCommand( uint32 account, const char * str, ...) ATTR_PRINTF(3, 4);
|
||||
void outRemote( const char * str, ... ) ATTR_PRINTF(2, 3);
|
||||
void outChat( const char * str, ... ) ATTR_PRINTF(2, 3);
|
||||
void outArena( const char * str, ... ) ATTR_PRINTF(2, 3);
|
||||
void outSQLDriver( const char* str, ... ) ATTR_PRINTF(2, 3);
|
||||
void outWarden( const char * str, ... ) ATTR_PRINTF(2, 3);
|
||||
void outCharDump( const char * str, uint32 account_id, uint32 guid, const char * name );
|
||||
void outStaticDebug(const char * str, ...) ATTR_PRINTF(2, 3);
|
||||
void outDebugInLine(const char * str, ...) ATTR_PRINTF(2, 3);
|
||||
void outErrorDb(const char * str, ...) ATTR_PRINTF(2, 3);
|
||||
void outChar(const char * str, ...) ATTR_PRINTF(2, 3);
|
||||
void outCommand(uint32 account, const char * str, ...) ATTR_PRINTF(3, 4);
|
||||
void outRemote(const char * str, ...) ATTR_PRINTF(2, 3);
|
||||
void outChat(const char * str, ...) ATTR_PRINTF(2, 3);
|
||||
void outArena(const char * str, ...) ATTR_PRINTF(2, 3);
|
||||
void outSQLDriver(const char* str, ...) ATTR_PRINTF(2, 3);
|
||||
void outWarden(const char * str, ...) ATTR_PRINTF(2, 3);
|
||||
void outCharDump(const char * str, uint32 account_id, uint32 guid, const char * name);
|
||||
|
||||
static void outTimestamp(FILE* file);
|
||||
static std::string GetTimestampStr();
|
||||
|
||||
Reference in New Issue
Block a user