Merge branch 'master' of https://github.com/TrinityCore/TrinityCore
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
DELETE FROM `disables` WHERE `entry` IN (10088,10089,10418,10419,10420,10421);
|
||||
|
||||
DELETE FROM `achievement_criteria_data` WHERE `criteria_id` IN (10088,10089,10418,10419,10420,10421) AND `type`=11;
|
||||
DELETE FROM `achievement_criteria_data` WHERE `criteria_id` IN (10088,10089,10418,10419,10420,10421) AND `type`=5;
|
||||
INSERT INTO `achievement_criteria_data` (`criteria_id`,`type`,`value1`,`value2`,`ScriptName`)
|
||||
VALUES
|
||||
(10088,5,58501,0,''),
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
DELETE FROM `script_texts` WHERE `npc_entry`=14507;
|
||||
DELETE FROM `creature_text` WHERE `entry`=14507;
|
||||
INSERT INTO `creature_text` (`entry`,`groupid`,`text`,`type`,`sound`,`comment`) VALUES
|
||||
(14507,1,'Let the coils of hate unfurl!',14,8421,'venoxis SAY_VENOXIS_TRANSFORM'),
|
||||
(14507,2,'Ssserenity..at lassst!',14,0,'venoxis SAY_VENOXIS_DEATH');
|
||||
@@ -0,0 +1,7 @@
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry`=14884;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=14884 AND `source_type`=0;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
|
||||
(14884,0,0,0,25,0,100,0,0,3,0,0,75,23867,0,0,0,0,0,1,0,0,0,0,0,0,0,'Parasitic Serpent - Cast Parasitic Serpent aura on spawn'),
|
||||
(14884,0,1,2,31,0,100,0,23865,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Parasitic Serpent - stop combat movement, linking to 2'),
|
||||
(14884,0,2,0,61,0,100,0,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Parasitic Serpent - evade, linking to 3'),
|
||||
(14884,0,3,0,7,0,100,0,0,0,0,0,41,10,0,0,0,0,0,1,0,0,0,0,0,0,0,'Parasitic Serpent - on evade despawn');
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1 @@
|
||||
UPDATE `item_template` SET `spellid_2`=53056 WHERE `entry`=39644;
|
||||
@@ -313,75 +313,85 @@ const T& RAND(const T& v1, const T& v2, const T& v3, const T& v4, const T& v5, c
|
||||
|
||||
class EventMap : private std::map<uint32, uint32>
|
||||
{
|
||||
private:
|
||||
uint32 m_time, m_phase;
|
||||
public:
|
||||
explicit EventMap(): m_time(0), m_phase(0) {}
|
||||
EventMap() : _time(0), _phase(0) {}
|
||||
|
||||
uint32 GetTimer() const { return m_time; }
|
||||
// Returns current timer value, does not represent real dates/times
|
||||
uint32 GetTimer() const { return _time; }
|
||||
|
||||
void Reset() { clear(); m_time = 0; m_phase = 0; }
|
||||
// Removes all events and clears phase
|
||||
void Reset() { clear(); _time = 0; _phase = 0; }
|
||||
|
||||
void Update(uint32 time) { m_time += time; }
|
||||
void Update(uint32 time) { _time += time; }
|
||||
|
||||
uint32 GetPhaseMask() const { return (m_phase >> 24) & 0xFF; }
|
||||
uint32 GetPhaseMask() const { return (_phase >> 24) & 0xFF; }
|
||||
|
||||
// Sets event phase, must be in range 1 - 8
|
||||
void SetPhase(uint32 phase)
|
||||
{
|
||||
if (phase && phase < 9)
|
||||
m_phase = (1 << (phase + 24));
|
||||
_phase = (1 << (phase + 24));
|
||||
}
|
||||
|
||||
void ScheduleEvent(uint32 eventId, uint32 time, uint32 gcd = 0, uint32 phase = 0)
|
||||
// Creates new event entry in map with given id, time, group if given (1 - 8) and phase if given (1 - 8)
|
||||
// 0 for group/phase means it belongs to no group or runs in all phases
|
||||
void ScheduleEvent(uint32 eventId, uint32 time, uint32 groupId = 0, uint32 phase = 0)
|
||||
{
|
||||
time += m_time;
|
||||
if (gcd && gcd < 9)
|
||||
eventId |= (1 << (gcd + 16));
|
||||
time += _time;
|
||||
if (groupId && groupId < 9)
|
||||
eventId |= (1 << (groupId + 16));
|
||||
if (phase && phase < 9)
|
||||
eventId |= (1 << (phase + 24));
|
||||
iterator itr = find(time);
|
||||
const_iterator itr = find(time);
|
||||
while (itr != end())
|
||||
{
|
||||
++time;
|
||||
itr = find(time);
|
||||
}
|
||||
|
||||
insert(std::make_pair(time, eventId));
|
||||
}
|
||||
|
||||
void RescheduleEvent(uint32 eventId, uint32 time, uint32 gcd = 0, uint32 phase = 0)
|
||||
// Removes event with specified id and creates new entry for it
|
||||
void RescheduleEvent(uint32 eventId, uint32 time, uint32 groupId = 0, uint32 phase = 0)
|
||||
{
|
||||
CancelEvent(eventId);
|
||||
ScheduleEvent(eventId, time, gcd, phase);
|
||||
ScheduleEvent(eventId, time, groupId, phase);
|
||||
}
|
||||
|
||||
// Reschedules closest event
|
||||
void RepeatEvent(uint32 time)
|
||||
{
|
||||
if (empty())
|
||||
return;
|
||||
|
||||
uint32 eventId = begin()->second;
|
||||
erase(begin());
|
||||
time += m_time;
|
||||
iterator itr = find(time);
|
||||
time += _time;
|
||||
const_iterator itr = find(time);
|
||||
while (itr != end())
|
||||
{
|
||||
++time;
|
||||
itr = find(time);
|
||||
}
|
||||
|
||||
insert(std::make_pair(time, eventId));
|
||||
}
|
||||
|
||||
// Removes first event
|
||||
void PopEvent()
|
||||
{
|
||||
erase(begin());
|
||||
}
|
||||
|
||||
// Gets next event id to execute and removes it from map
|
||||
uint32 ExecuteEvent()
|
||||
{
|
||||
while (!empty())
|
||||
{
|
||||
if (begin()->first > m_time)
|
||||
if (begin()->first > _time)
|
||||
return 0;
|
||||
else if (m_phase && (begin()->second & 0xFF000000) && !(begin()->second & m_phase))
|
||||
else if (_phase && (begin()->second & 0xFF000000) && !(begin()->second & _phase))
|
||||
erase(begin());
|
||||
else
|
||||
{
|
||||
@@ -393,39 +403,41 @@ class EventMap : private std::map<uint32, uint32>
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Gets next event id to execute
|
||||
uint32 GetEvent()
|
||||
{
|
||||
while (!empty())
|
||||
{
|
||||
if (begin()->first > m_time)
|
||||
if (begin()->first > _time)
|
||||
return 0;
|
||||
else if (m_phase && (begin()->second & 0xFF000000) && !(begin()->second & m_phase))
|
||||
else if (_phase && (begin()->second & 0xFF000000) && !(begin()->second & _phase))
|
||||
erase(begin());
|
||||
else
|
||||
return (begin()->second & 0x0000FFFF);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Delay all events
|
||||
void DelayEvents(uint32 delay)
|
||||
{
|
||||
if (delay < m_time)
|
||||
m_time -= delay;
|
||||
if (delay < _time)
|
||||
_time -= delay;
|
||||
else
|
||||
m_time = 0;
|
||||
_time = 0;
|
||||
}
|
||||
|
||||
// Delay all events having the specified Global Cooldown.
|
||||
void DelayEvents(uint32 delay, uint32 gcd)
|
||||
// Delay all events having the specified Group
|
||||
void DelayEvents(uint32 delay, uint32 groupId)
|
||||
{
|
||||
uint32 nextTime = m_time + delay;
|
||||
gcd = (1 << (gcd + 16));
|
||||
uint32 nextTime = _time + delay;
|
||||
uint32 groupMask = (1 << (groupId + 16));
|
||||
for (iterator itr = begin(); itr != end() && itr->first < nextTime;)
|
||||
{
|
||||
if (itr->second & gcd)
|
||||
if (itr->second & groupMask)
|
||||
{
|
||||
ScheduleEvent(itr->second, itr->first-m_time+delay);
|
||||
ScheduleEvent(itr->second, itr->first - _time + delay);
|
||||
erase(itr);
|
||||
itr = begin();
|
||||
}
|
||||
@@ -434,6 +446,7 @@ class EventMap : private std::map<uint32, uint32>
|
||||
}
|
||||
}
|
||||
|
||||
// Cancel events with specified id
|
||||
void CancelEvent(uint32 eventId)
|
||||
{
|
||||
for (iterator itr = begin(); itr != end();)
|
||||
@@ -448,13 +461,14 @@ class EventMap : private std::map<uint32, uint32>
|
||||
}
|
||||
}
|
||||
|
||||
void CancelEventsByGCD(uint32 gcd)
|
||||
// Cancel events belonging to specified group
|
||||
void CancelEventGroup(uint32 groupId)
|
||||
{
|
||||
gcd = (1 << (gcd + 16));
|
||||
uint32 groupMask = (1 << (groupId + 16));
|
||||
|
||||
for (iterator itr = begin(); itr != end();)
|
||||
{
|
||||
if (itr->second & gcd)
|
||||
if (itr->second & groupMask)
|
||||
{
|
||||
erase(itr);
|
||||
itr = begin();
|
||||
@@ -463,6 +477,21 @@ class EventMap : private std::map<uint32, uint32>
|
||||
++itr;
|
||||
}
|
||||
}
|
||||
|
||||
// Returns time of next event to execute
|
||||
// To get how much time remains substract _time
|
||||
uint32 GetNextEventTime(uint32 eventId) const
|
||||
{
|
||||
for (const_iterator itr = begin(); itr != end(); ++itr)
|
||||
if (eventId == (itr->second & 0x0000FFFF))
|
||||
return itr->first;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
private:
|
||||
uint32 _time;
|
||||
uint32 _phase;
|
||||
};
|
||||
|
||||
enum AITarget
|
||||
|
||||
@@ -108,7 +108,7 @@ AccountOpResult AccountMgr::ChangeUsername(uint32 accid, std::string new_uname,
|
||||
normalizeString(new_passwd);
|
||||
|
||||
std::string safe_new_uname = new_uname;
|
||||
LoginDatabase.escape_string(safe_new_uname);
|
||||
LoginDatabase.EscapeString(safe_new_uname);
|
||||
|
||||
LoginDatabase.PExecute("UPDATE account SET v='0', s='0', username='%s', sha_pass_hash='%s' WHERE id='%d'", safe_new_uname.c_str(),
|
||||
CalculateShaPassHash(new_uname, new_passwd).c_str(), accid);
|
||||
@@ -138,7 +138,7 @@ AccountOpResult AccountMgr::ChangePassword(uint32 accid, std::string new_passwd)
|
||||
|
||||
uint32 AccountMgr::GetId(std::string username)
|
||||
{
|
||||
LoginDatabase.escape_string(username);
|
||||
LoginDatabase.EscapeString(username);
|
||||
QueryResult result = LoginDatabase.PQuery("SELECT id FROM account WHERE username = '%s'", username.c_str());
|
||||
if (!result)
|
||||
return 0;
|
||||
|
||||
@@ -67,7 +67,7 @@ void AddonMgr::LoadFromDB()
|
||||
void AddonMgr::SaveAddon(AddonInfo const& addon)
|
||||
{
|
||||
std::string name = addon.Name;
|
||||
CharacterDatabase.escape_string(name);
|
||||
CharacterDatabase.EscapeString(name);
|
||||
CharacterDatabase.PExecute("INSERT INTO addons (name, crc) VALUES ('%s', %u)", name.c_str(), addon.CRC);
|
||||
|
||||
SavedAddon newAddon(addon.Name, addon.CRC);
|
||||
|
||||
@@ -93,7 +93,7 @@ bool ChatHandler::HandleServerInfoCommand(const char* /*args*/)
|
||||
std::string uptime = secsToTimeString(sWorld->GetUptime());
|
||||
uint32 updateTime = sWorld->GetUpdateTime();
|
||||
|
||||
PSendSysMessage(_FULLVERSION);
|
||||
SendSysMessage(_FULLVERSION);
|
||||
PSendSysMessage(LANG_CONNECTED_PLAYERS, PlayersNum, MaxPlayersNum);
|
||||
PSendSysMessage(LANG_CONNECTED_USERS, activeClientsNum, maxActiveClientsNum, queuedClientsNum, maxQueuedClientsNum);
|
||||
PSendSysMessage(LANG_UPTIME, uptime.c_str());
|
||||
|
||||
@@ -611,7 +611,7 @@ bool ChatHandler::HandleLookupPlayerIpCommand(const char* args)
|
||||
char* limit_str = strtok (NULL, " ");
|
||||
int32 limit = limit_str ? atoi (limit_str) : -1;
|
||||
|
||||
LoginDatabase.escape_string (ip);
|
||||
LoginDatabase.EscapeString (ip);
|
||||
|
||||
QueryResult result = LoginDatabase.PQuery ("SELECT id, username FROM account WHERE last_ip = '%s'", ip.c_str ());
|
||||
|
||||
@@ -630,7 +630,7 @@ bool ChatHandler::HandleLookupPlayerAccountCommand(const char* args)
|
||||
if (!AccountMgr::normalizeString (account))
|
||||
return false;
|
||||
|
||||
LoginDatabase.escape_string (account);
|
||||
LoginDatabase.EscapeString (account);
|
||||
|
||||
QueryResult result = LoginDatabase.PQuery ("SELECT id, username FROM account WHERE username = '%s'", account.c_str ());
|
||||
|
||||
@@ -647,7 +647,7 @@ bool ChatHandler::HandleLookupPlayerEmailCommand(const char* args)
|
||||
char* limit_str = strtok (NULL, " ");
|
||||
int32 limit = limit_str ? atoi (limit_str) : -1;
|
||||
|
||||
LoginDatabase.escape_string (email);
|
||||
LoginDatabase.EscapeString (email);
|
||||
|
||||
QueryResult result = LoginDatabase.PQuery ("SELECT id, username FROM account WHERE email = '%s'", email.c_str ());
|
||||
|
||||
|
||||
@@ -225,7 +225,7 @@ bool ChatHandler::HandleAddItemCommand(const char *args)
|
||||
if (citemName && citemName[0])
|
||||
{
|
||||
std::string itemName = citemName+1;
|
||||
WorldDatabase.escape_string(itemName);
|
||||
WorldDatabase.EscapeString(itemName);
|
||||
QueryResult result = WorldDatabase.PQuery("SELECT entry FROM item_template WHERE name = '%s'", itemName.c_str());
|
||||
if (!result)
|
||||
{
|
||||
@@ -3184,7 +3184,7 @@ bool ChatHandler::HandleBanInfoIPCommand(const char *args)
|
||||
|
||||
std::string IP = cIP;
|
||||
|
||||
LoginDatabase.escape_string(IP);
|
||||
LoginDatabase.EscapeString(IP);
|
||||
QueryResult result = LoginDatabase.PQuery("SELECT ip, FROM_UNIXTIME(bandate), FROM_UNIXTIME(unbandate), unbandate-UNIX_TIMESTAMP(), banreason, bannedby, unbandate-bandate FROM ip_banned WHERE ip = '%s'", IP.c_str());
|
||||
if (!result)
|
||||
{
|
||||
@@ -3293,7 +3293,7 @@ bool ChatHandler::HandleBanListAccountCommand(const char *args)
|
||||
|
||||
char* cFilter = strtok((char*)args, " ");
|
||||
std::string filter = cFilter ? cFilter : "";
|
||||
LoginDatabase.escape_string(filter);
|
||||
LoginDatabase.EscapeString(filter);
|
||||
|
||||
QueryResult result;
|
||||
|
||||
@@ -3398,7 +3398,7 @@ bool ChatHandler::HandleBanListIPCommand(const char *args)
|
||||
|
||||
char* cFilter = strtok((char*)args, " ");
|
||||
std::string filter = cFilter ? cFilter : "";
|
||||
LoginDatabase.escape_string(filter);
|
||||
LoginDatabase.EscapeString(filter);
|
||||
|
||||
QueryResult result;
|
||||
|
||||
|
||||
@@ -384,7 +384,7 @@ void Pet::SavePetToDB(PetSaveMode mode)
|
||||
{
|
||||
uint32 owner = GUID_LOPART(GetOwnerGUID());
|
||||
std::string name = m_name;
|
||||
CharacterDatabase.escape_string(name);
|
||||
CharacterDatabase.EscapeString(name);
|
||||
SQLTransaction trans = CharacterDatabase.BeginTransaction();
|
||||
// remove current data
|
||||
trans->PAppend("DELETE FROM character_pet WHERE owner = '%u' AND id = '%u'", owner, m_charmInfo->GetPetNumber());
|
||||
|
||||
@@ -18186,7 +18186,7 @@ void Player::SaveToDB()
|
||||
outDebugValues();
|
||||
|
||||
std::string sql_name = m_name;
|
||||
CharacterDatabase.escape_string(sql_name);
|
||||
CharacterDatabase.EscapeString(sql_name);
|
||||
|
||||
std::ostringstream ss;
|
||||
ss << "REPLACE INTO characters (guid, account, name, race, class, gender, level, xp, money, playerBytes, playerBytes2, playerFlags, "
|
||||
|
||||
@@ -108,7 +108,7 @@ void PlayerSocial::SetFriendNote(uint32 friend_guid, std::string note)
|
||||
|
||||
utf8truncate(note, 48); // DB and client size limitation
|
||||
|
||||
CharacterDatabase.escape_string(note);
|
||||
CharacterDatabase.EscapeString(note);
|
||||
CharacterDatabase.PExecute("UPDATE character_social SET note = '%s' WHERE guid = '%u' AND friend = '%u'", note.c_str(), GetPlayerGUID(), friend_guid);
|
||||
m_playerSocialMap[friend_guid].Note = note;
|
||||
}
|
||||
|
||||
@@ -3797,7 +3797,7 @@ void Unit::RemoveAurasDueToSpellBySteal(uint32 spellId, uint64 casterGUID, Unit
|
||||
if (aura->IsSingleTarget())
|
||||
aura->UnregisterSingleTarget();
|
||||
|
||||
if (newAura = Aura::TryRefreshStackOrCreate(aura->GetSpellProto(), effMask, stealer, NULL, &baseDamage[0], NULL, aura->GetCasterGUID()))
|
||||
if (Aura* newAura = Aura::TryRefreshStackOrCreate(aura->GetSpellProto(), effMask, stealer, NULL, &baseDamage[0], NULL, aura->GetCasterGUID()))
|
||||
{
|
||||
// created aura must not be single target aura,, so stealer won't loose it on recast
|
||||
if (newAura->IsSingleTarget())
|
||||
|
||||
@@ -286,7 +286,7 @@ Corpse* ObjectAccessor::ConvertCorpseForPlayer(uint64 player_guid, bool insignia
|
||||
Corpse* bones = NULL;
|
||||
// create the bones only if the map and the grid is loaded at the corpse's location
|
||||
// ignore bones creating option in case insignia
|
||||
|
||||
|
||||
if (map && (insignia ||
|
||||
(map->IsBattlegroundOrArena() ? sWorld->getBoolConfig(CONFIG_DEATH_BONES_BG_OR_ARENA) : sWorld->getBoolConfig(CONFIG_DEATH_BONES_WORLD))) &&
|
||||
!map->IsRemovalGrid(corpse->GetPositionX(), corpse->GetPositionY()))
|
||||
|
||||
@@ -2002,7 +2002,7 @@ uint64 ObjectMgr::GetPlayerGUIDByName(std::string name) const
|
||||
{
|
||||
uint64 guid = 0;
|
||||
|
||||
CharacterDatabase.escape_string(name);
|
||||
CharacterDatabase.EscapeString(name);
|
||||
|
||||
// Player name safe to sending to DB (checked at login) and this function using
|
||||
QueryResult result = CharacterDatabase.PQuery("SELECT guid FROM characters WHERE name = '%s'", name.c_str());
|
||||
|
||||
@@ -1158,7 +1158,7 @@ void WorldSession::HandleCharRenameOpcode(WorldPacket& recv_data)
|
||||
}
|
||||
|
||||
std::string escaped_newname = newname;
|
||||
CharacterDatabase.escape_string(escaped_newname);
|
||||
CharacterDatabase.EscapeString(escaped_newname);
|
||||
|
||||
// make sure that the character belongs to the current account, that rename at login is enabled
|
||||
// and that there is no character with the desired new name
|
||||
@@ -1270,7 +1270,7 @@ void WorldSession::HandleSetPlayerDeclinedNames(WorldPacket& recv_data)
|
||||
}
|
||||
|
||||
for (int i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
|
||||
CharacterDatabase.escape_string(declinedname.name[i]);
|
||||
CharacterDatabase.EscapeString(declinedname.name[i]);
|
||||
|
||||
SQLTransaction trans = CharacterDatabase.BeginTransaction();
|
||||
trans->PAppend("DELETE FROM character_declinedname WHERE guid = '%u'", GUID_LOPART(guid));
|
||||
@@ -1431,7 +1431,7 @@ void WorldSession::HandleCharCustomize(WorldPacket& recv_data)
|
||||
}
|
||||
}
|
||||
|
||||
CharacterDatabase.escape_string(newname);
|
||||
CharacterDatabase.EscapeString(newname);
|
||||
if (QueryResult result = CharacterDatabase.PQuery("SELECT name FROM characters WHERE guid ='%u'", GUID_LOPART(guid)))
|
||||
{
|
||||
std::string oldname = result->Fetch()[0].GetString();
|
||||
@@ -1654,7 +1654,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data)
|
||||
}
|
||||
}
|
||||
|
||||
CharacterDatabase.escape_string(newname);
|
||||
CharacterDatabase.EscapeString(newname);
|
||||
Player::Customize(guid, gender, skin, face, hairStyle, hairColor, facialHair);
|
||||
SQLTransaction trans = CharacterDatabase.BeginTransaction();
|
||||
trans->PAppend("UPDATE `characters` SET name='%s', race='%u', at_login=at_login & ~ %u WHERE guid='%u'", newname.c_str(), race, used_loginFlag, lowGuid);
|
||||
|
||||
@@ -599,7 +599,7 @@ void WorldSession::HandleGroupChangeSubGroupOpcode(WorldPacket & recv_data)
|
||||
}
|
||||
else
|
||||
{
|
||||
CharacterDatabase.escape_string(name);
|
||||
CharacterDatabase.EscapeString(name);
|
||||
guid = sObjectMgr->GetPlayerGUIDByName(name.c_str());
|
||||
}
|
||||
|
||||
|
||||
@@ -553,7 +553,7 @@ void WorldSession::HandleAddFriendOpcode(WorldPacket & recv_data)
|
||||
if (!normalizePlayerName(friendName))
|
||||
return;
|
||||
|
||||
CharacterDatabase.escape_string(friendName); // prevent SQL injection - normal name don't must changed by this call
|
||||
CharacterDatabase.EscapeString(friendName); // prevent SQL injection - normal name don't must changed by this call
|
||||
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: %s asked to add friend : '%s'",
|
||||
GetPlayer()->GetName(), friendName.c_str());
|
||||
@@ -642,7 +642,7 @@ void WorldSession::HandleAddIgnoreOpcode(WorldPacket & recv_data)
|
||||
if (!normalizePlayerName(IgnoreName))
|
||||
return;
|
||||
|
||||
CharacterDatabase.escape_string(IgnoreName); // prevent SQL injection - normal name don't must changed by this call
|
||||
CharacterDatabase.EscapeString(IgnoreName); // prevent SQL injection - normal name don't must changed by this call
|
||||
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: %s asked to Ignore: '%s'",
|
||||
GetPlayer()->GetName(), IgnoreName.c_str());
|
||||
@@ -728,8 +728,8 @@ void WorldSession::HandleBugOpcode(WorldPacket & recv_data)
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "%s", type.c_str());
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "%s", content.c_str());
|
||||
|
||||
CharacterDatabase.escape_string(type);
|
||||
CharacterDatabase.escape_string(content);
|
||||
CharacterDatabase.EscapeString(type);
|
||||
CharacterDatabase.EscapeString(content);
|
||||
CharacterDatabase.PExecute ("INSERT INTO bugreport (type, content) VALUES('%s', '%s')", type.c_str(), content.c_str());
|
||||
}
|
||||
|
||||
|
||||
@@ -643,13 +643,13 @@ void WorldSession::HandlePetRename(WorldPacket & recv_data)
|
||||
if (isdeclined)
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
|
||||
CharacterDatabase.escape_string(declinedname.name[i]);
|
||||
CharacterDatabase.EscapeString(declinedname.name[i]);
|
||||
trans->PAppend("DELETE FROM character_pet_declinedname WHERE owner = '%u' AND id = '%u'", _player->GetGUIDLow(), pet->GetCharmInfo()->GetPetNumber());
|
||||
trans->PAppend("INSERT INTO character_pet_declinedname (id, owner, genitive, dative, accusative, instrumental, prepositional) VALUES ('%u', '%u', '%s', '%s', '%s', '%s', '%s')",
|
||||
pet->GetCharmInfo()->GetPetNumber(), _player->GetGUIDLow(), declinedname.name[0].c_str(), declinedname.name[1].c_str(), declinedname.name[2].c_str(), declinedname.name[3].c_str(), declinedname.name[4].c_str());
|
||||
}
|
||||
|
||||
CharacterDatabase.escape_string(name);
|
||||
CharacterDatabase.EscapeString(name);
|
||||
trans->PAppend("UPDATE character_pet SET name = '%s', renamed = '1' WHERE owner = '%u' AND id = '%u'", name.c_str(), _player->GetGUIDLow(), pet->GetCharmInfo()->GetPetNumber());
|
||||
CharacterDatabase.CommitTransaction(trans);
|
||||
|
||||
|
||||
@@ -233,7 +233,7 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recv_data)
|
||||
ssInvalidPetitionGUIDs << "'" << charter->GetGUIDLow() << "'";
|
||||
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "Invalid petition GUIDs: %s", ssInvalidPetitionGUIDs.str().c_str());
|
||||
CharacterDatabase.escape_string(name);
|
||||
CharacterDatabase.EscapeString(name);
|
||||
SQLTransaction trans = CharacterDatabase.BeginTransaction();
|
||||
trans->PAppend("DELETE FROM petition WHERE petitionguid IN (%s)", ssInvalidPetitionGUIDs.str().c_str());
|
||||
trans->PAppend("DELETE FROM petition_sign WHERE petitionguid IN (%s)", ssInvalidPetitionGUIDs.str().c_str());
|
||||
@@ -432,7 +432,7 @@ void WorldSession::HandlePetitionRenameOpcode(WorldPacket & recv_data)
|
||||
}
|
||||
|
||||
std::string db_newname = newname;
|
||||
CharacterDatabase.escape_string(db_newname);
|
||||
CharacterDatabase.EscapeString(db_newname);
|
||||
CharacterDatabase.PExecute("UPDATE petition SET name = '%s' WHERE petitionguid = '%u'",
|
||||
db_newname.c_str(), GUID_LOPART(petitionguid));
|
||||
|
||||
|
||||
@@ -755,7 +755,7 @@ void WorldSession::ReadMovementInfo(WorldPacket &data, MovementInfo *mi)
|
||||
if (mi->HasMovementFlag(MOVEMENTFLAG_SPLINE_ELEVATION))
|
||||
data >> mi->splineElevation;
|
||||
|
||||
// This must be a packet spoofing attempt. MOVEMENTFLAG_ROOT sent from the client is not valid,
|
||||
// This must be a packet spoofing attempt. MOVEMENTFLAG_ROOT sent from the client is not valid,
|
||||
// and when used in conjunction with any of the moving movement flags such as MOVEMENTFLAG_FORWARD
|
||||
// it will freeze clients that receive this player's movement info.
|
||||
if (mi->HasMovementFlag(MOVEMENTFLAG_ROOT))
|
||||
|
||||
@@ -812,7 +812,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
|
||||
|
||||
// Get the account information from the realmd database
|
||||
std::string safe_account = account; // Duplicate, else will screw the SHA hash verification below
|
||||
LoginDatabase.escape_string (safe_account);
|
||||
LoginDatabase.EscapeString (safe_account);
|
||||
// No SQL injection, username escaped.
|
||||
|
||||
QueryResult result =
|
||||
@@ -978,7 +978,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
|
||||
|
||||
// Update the last_ip in the database
|
||||
// No SQL injection, username escaped.
|
||||
LoginDatabase.escape_string (address);
|
||||
LoginDatabase.EscapeString (address);
|
||||
|
||||
LoginDatabase.PExecute ("UPDATE account "
|
||||
"SET last_ip = '%s' "
|
||||
|
||||
@@ -3726,10 +3726,10 @@ void Spell::SendCastResult(Player* caster, SpellEntry const* spellInfo, uint8 ca
|
||||
case SPELL_FAILED_TOO_MANY_OF_ITEM:
|
||||
{
|
||||
uint32 item = 0;
|
||||
for (int8 x=0;x < 3;x++)
|
||||
for (int8 x = 0;x < 3; x++)
|
||||
if (spellInfo->EffectItemType[x])
|
||||
item = spellInfo->EffectItemType[x];
|
||||
ItemTemplate const *pProto = sObjectMgr->GetItemTemplate(item);
|
||||
ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(item);
|
||||
if (pProto && pProto->ItemLimitCategory)
|
||||
data << uint32(pProto->ItemLimitCategory);
|
||||
break;
|
||||
@@ -5579,7 +5579,7 @@ SpellCastResult Spell::CheckPetCast(Unit* target)
|
||||
SpellCastResult Spell::CheckCasterAuras() const
|
||||
{
|
||||
// spells totally immuned to caster auras (wsg flag drop, give marks etc)
|
||||
if (m_spellInfo->AttributesEx6& SPELL_ATTR6_IGNORE_CASTER_AURAS)
|
||||
if (m_spellInfo->AttributesEx6 & SPELL_ATTR6_IGNORE_CASTER_AURAS)
|
||||
return SPELL_CAST_OK;
|
||||
|
||||
uint8 school_immune = 0;
|
||||
@@ -5604,17 +5604,38 @@ SpellCastResult Spell::CheckCasterAuras() const
|
||||
mechanic_immune = IMMUNE_TO_MOVEMENT_IMPAIRMENT_AND_LOSS_CONTROL_MASK;
|
||||
}
|
||||
|
||||
bool usableInStun = m_spellInfo->AttributesEx5 & SPELL_ATTR5_USABLE_WHILE_STUNNED;
|
||||
|
||||
// Glyph of Pain Suppression
|
||||
if (m_spellInfo->SpellFamilyName == SPELLFAMILY_PRIEST && m_spellInfo->SpellIconID == 2178)
|
||||
if (m_caster->HasAuraEffect(63248, 0)) // no SpellFamilyFlags or SpellIconID to identify this
|
||||
mechanic_immune = 1 << MECHANIC_STUN; // "immune" to stun only for this cast
|
||||
// there is no other way to handle it
|
||||
if (m_spellInfo->Id == 33206 && !m_caster->HasAura(63248))
|
||||
usableInStun = false;
|
||||
|
||||
// Check whether the cast should be prevented by any state you might have.
|
||||
SpellCastResult prevented_reason = SPELL_CAST_OK;
|
||||
// Have to check if there is a stun aura. Otherwise will have problems with ghost aura apply while logging out
|
||||
uint32 unitflag = m_caster->GetUInt32Value(UNIT_FIELD_FLAGS); // Get unit state
|
||||
if (unitflag & UNIT_FLAG_STUNNED && !(m_spellInfo->AttributesEx5 & SPELL_ATTR5_USABLE_WHILE_STUNNED))
|
||||
prevented_reason = SPELL_FAILED_STUNNED;
|
||||
if (unitflag & UNIT_FLAG_STUNNED)
|
||||
{
|
||||
// spell is usable while stunned, check if caster has only mechanic stun auras, another stun types must prevent cast spell
|
||||
if (usableInStun)
|
||||
{
|
||||
bool foundNotStun = false;
|
||||
Unit::AuraEffectList const& stunAuras = m_caster->GetAuraEffectsByType(SPELL_AURA_MOD_STUN);
|
||||
for (Unit::AuraEffectList::const_iterator i = stunAuras.begin(); i != stunAuras.end(); ++i)
|
||||
{
|
||||
if (!(GetAllSpellMechanicMask((*i)->GetSpellProto()) & (1<<MECHANIC_STUN)))
|
||||
{
|
||||
foundNotStun = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (foundNotStun)
|
||||
prevented_reason = SPELL_FAILED_STUNNED;
|
||||
}
|
||||
else
|
||||
prevented_reason = SPELL_FAILED_STUNNED;
|
||||
}
|
||||
else if (unitflag & UNIT_FLAG_CONFUSED && !(m_spellInfo->AttributesEx5 & SPELL_ATTR5_USABLE_WHILE_CONFUSED))
|
||||
prevented_reason = SPELL_FAILED_CONFUSED;
|
||||
else if (unitflag & UNIT_FLAG_FLEEING && !(m_spellInfo->AttributesEx5 & SPELL_ATTR5_USABLE_WHILE_FEARED))
|
||||
@@ -5634,23 +5655,24 @@ SpellCastResult Spell::CheckCasterAuras() const
|
||||
for (Unit::AuraApplicationMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
|
||||
{
|
||||
Aura const* aura = itr->second->GetBase();
|
||||
if (GetAllSpellMechanicMask(aura->GetSpellProto()) & mechanic_immune)
|
||||
SpellEntry const* auraInfo = aura->GetSpellProto();
|
||||
if (GetAllSpellMechanicMask(auraInfo) & mechanic_immune)
|
||||
continue;
|
||||
if (GetSpellSchoolMask(aura->GetSpellProto()) & school_immune)
|
||||
if (GetSpellSchoolMask(auraInfo) & school_immune)
|
||||
continue;
|
||||
if ((1<<(aura->GetSpellProto()->Dispel)) & dispel_immune)
|
||||
if ((1<<(auraInfo->Dispel)) & dispel_immune)
|
||||
continue;
|
||||
|
||||
//Make a second check for spell failed so the right SPELL_FAILED message is returned.
|
||||
//That is needed when your casting is prevented by multiple states and you are only immune to some of them.
|
||||
for (uint8 i=0; i<MAX_SPELL_EFFECTS; ++i)
|
||||
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
{
|
||||
if (AuraEffect * part = aura->GetEffect(i))
|
||||
if (AuraEffect* part = aura->GetEffect(i))
|
||||
{
|
||||
switch(part->GetAuraType())
|
||||
switch (part->GetAuraType())
|
||||
{
|
||||
case SPELL_AURA_MOD_STUN:
|
||||
if (!(m_spellInfo->AttributesEx5 & SPELL_ATTR5_USABLE_WHILE_STUNNED))
|
||||
if (!usableInStun || !(GetAllSpellMechanicMask(auraInfo) & (1<<MECHANIC_STUN)))
|
||||
return SPELL_FAILED_STUNNED;
|
||||
break;
|
||||
case SPELL_AURA_MOD_CONFUSE:
|
||||
|
||||
@@ -4116,10 +4116,6 @@ void SpellMgr::LoadSpellCustomAttr()
|
||||
spellInfo->AttributesEx3 |= SPELL_ATTR3_NO_DONE_BONUS;
|
||||
++count;
|
||||
break;
|
||||
case 33206: // Pain Suppression
|
||||
spellInfo->AttributesEx5 &= ~SPELL_ATTR5_USABLE_WHILE_STUNNED;
|
||||
++count;
|
||||
break;
|
||||
case 8145: // Tremor Totem (instant pulse)
|
||||
case 6474: // Earthbind Totem (instant pulse)
|
||||
spellInfo->AttributesEx5 |= SPELL_ATTR5_START_PERIODIC_AT_APPLY;
|
||||
|
||||
@@ -206,7 +206,7 @@ std::string CreateDumpString(char const* tableName, QueryResult result)
|
||||
else ss << ", '";
|
||||
|
||||
std::string s = fields[i].GetString();
|
||||
CharacterDatabase.escape_string(s);
|
||||
CharacterDatabase.EscapeString(s);
|
||||
ss << s;
|
||||
|
||||
ss << "'";
|
||||
@@ -411,7 +411,7 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
|
||||
|
||||
if (ObjectMgr::CheckPlayerName(name, true) == CHAR_NAME_SUCCESS)
|
||||
{
|
||||
CharacterDatabase.escape_string(name); // for safe, we use name only for sql quearies anyway
|
||||
CharacterDatabase.EscapeString(name); // for safe, we use name only for sql quearies anyway
|
||||
result = CharacterDatabase.PQuery("SELECT 1 FROM characters WHERE name = '%s'", name.c_str());
|
||||
if (result)
|
||||
name = ""; // use the one from the dump
|
||||
@@ -507,7 +507,7 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
|
||||
{
|
||||
// check if the original name already exists
|
||||
name = getnth(line, 3);
|
||||
CharacterDatabase.escape_string(name);
|
||||
CharacterDatabase.EscapeString(name);
|
||||
|
||||
result = CharacterDatabase.PQuery("SELECT 1 FROM characters WHERE name = '%s'", name.c_str());
|
||||
if (result)
|
||||
|
||||
@@ -12,21 +12,22 @@ set(scripts_STAT_SRCS
|
||||
${scripts_STAT_SRCS}
|
||||
Commands/cs_account.cpp
|
||||
Commands/cs_achievement.cpp
|
||||
Commands/cs_debug.cpp
|
||||
Commands/cs_event.cpp
|
||||
Commands/cs_gm.cpp
|
||||
Commands/cs_npc.cpp
|
||||
Commands/cs_go.cpp
|
||||
Commands/cs_gobject.cpp
|
||||
Commands/cs_gps.cpp
|
||||
Commands/cs_honor.cpp
|
||||
Commands/cs_learn.cpp
|
||||
Commands/cs_modify.cpp
|
||||
Commands/cs_debug.cpp
|
||||
Commands/cs_tele.cpp
|
||||
# Commands/cs_character.cpp
|
||||
Commands/cs_event.cpp
|
||||
Commands/cs_gobject.cpp
|
||||
Commands/cs_honor.cpp
|
||||
Commands/cs_wp.cpp
|
||||
Commands/cs_titles.cpp
|
||||
Commands/cs_npc.cpp
|
||||
Commands/cs_quest.cpp
|
||||
Commands/cs_reload.cpp
|
||||
Commands/cs_tele.cpp
|
||||
Commands/cs_titles.cpp
|
||||
Commands/cs_wp.cpp
|
||||
# Commands/cs_character.cpp
|
||||
# Commands/cs_list.cpp
|
||||
# Commands/cs_lookup.cpp
|
||||
# Commands/cs_pdump.cpp
|
||||
@@ -54,7 +55,6 @@ set(scripts_STAT_SRCS
|
||||
# Commands/cs_die.cpp
|
||||
# Commands/cs_revive.cpp
|
||||
# Commands/cs_dismount.cpp
|
||||
Commands/cs_gps.cpp
|
||||
# Commands/cs_guid.cpp
|
||||
# Commands/cs_help.cpp
|
||||
# Commands/cs_itemmove.cpp
|
||||
|
||||
@@ -249,7 +249,7 @@ public:
|
||||
|
||||
static bool HandleDebugSendOpcodeCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
Unit *unit = handler->getSelectedUnit();
|
||||
Unit* unit = handler->getSelectedUnit();
|
||||
Player* player = NULL;
|
||||
if (!unit || (unit->GetTypeId() != TYPEID_PLAYER))
|
||||
player = handler->GetSession()->GetPlayer();
|
||||
@@ -320,7 +320,7 @@ public:
|
||||
}
|
||||
else if (type == "appgoguid")
|
||||
{
|
||||
GameObject *obj = handler->GetNearbyGameObject();
|
||||
GameObject* obj = handler->GetNearbyGameObject();
|
||||
if (!obj)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_COMMAND_OBJNOTFOUND, 0);
|
||||
@@ -332,7 +332,7 @@ public:
|
||||
}
|
||||
else if (type == "goguid")
|
||||
{
|
||||
GameObject *obj = handler->GetNearbyGameObject();
|
||||
GameObject* obj = handler->GetNearbyGameObject();
|
||||
if (!obj)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_COMMAND_OBJNOTFOUND, 0);
|
||||
@@ -392,14 +392,14 @@ public:
|
||||
|
||||
static bool HandleDebugAreaTriggersCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
Player* plr = handler->GetSession()->GetPlayer();
|
||||
if (!plr->isDebugAreaTriggers)
|
||||
Player* player = handler->GetSession()->GetPlayer();
|
||||
if (!player->isDebugAreaTriggers)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_DEBUG_AREATRIGGER_ON);
|
||||
plr->isDebugAreaTriggers = true;
|
||||
player->isDebugAreaTriggers = true;
|
||||
} else {
|
||||
handler->PSendSysMessage(LANG_DEBUG_AREATRIGGER_OFF);
|
||||
plr->isDebugAreaTriggers = false;
|
||||
player->isDebugAreaTriggers = false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -489,7 +489,7 @@ public:
|
||||
if (i >= BUYBACK_SLOT_START && i < BUYBACK_SLOT_END)
|
||||
continue;
|
||||
|
||||
if (Item *item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, i))
|
||||
if (Item* item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, i))
|
||||
{
|
||||
if (Bag* bag = item->ToBag())
|
||||
{
|
||||
@@ -509,7 +509,7 @@ public:
|
||||
std::vector<Item *> &updateQueue = player->GetItemUpdateQueue();
|
||||
for (size_t i = 0; i < updateQueue.size(); ++i)
|
||||
{
|
||||
Item *item = updateQueue[i];
|
||||
Item* item = updateQueue[i];
|
||||
if (!item) continue;
|
||||
|
||||
Bag *container = item->GetContainer();
|
||||
@@ -539,7 +539,7 @@ public:
|
||||
if (i >= BUYBACK_SLOT_START && i < BUYBACK_SLOT_END)
|
||||
continue;
|
||||
|
||||
Item *item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, i);
|
||||
Item* item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, i);
|
||||
if (!item) continue;
|
||||
|
||||
if (item->GetSlot() != i)
|
||||
@@ -651,7 +651,7 @@ public:
|
||||
|
||||
for (size_t i = 0; i < updateQueue.size(); ++i)
|
||||
{
|
||||
Item *item = updateQueue[i];
|
||||
Item* item = updateQueue[i];
|
||||
if (!item) continue;
|
||||
|
||||
if (item->GetOwnerGUID() != player->GetGUID())
|
||||
@@ -667,7 +667,7 @@ public:
|
||||
}
|
||||
|
||||
if (item->GetState() == ITEM_REMOVED) continue;
|
||||
Item *test = player->GetItemByPos(item->GetBagSlot(), item->GetSlot());
|
||||
Item* test = player->GetItemByPos(item->GetBagSlot(), item->GetSlot());
|
||||
|
||||
if (test == NULL)
|
||||
{
|
||||
@@ -784,7 +784,7 @@ public:
|
||||
handler->GetSession()->GetPlayer()->EnterVehicle(target, seatId);
|
||||
else
|
||||
{
|
||||
Creature *passenger = NULL;
|
||||
Creature* passenger = NULL;
|
||||
Trinity::AllCreaturesOfEntryInRange check(handler->GetSession()->GetPlayer(), entry, 20.0f);
|
||||
Trinity::CreatureSearcher<Trinity::AllCreaturesOfEntryInRange> searcher(handler->GetSession()->GetPlayer(), passenger, check);
|
||||
handler->GetSession()->GetPlayer()->VisitNearbyObject(30.0f, searcher);
|
||||
@@ -828,7 +828,7 @@ public:
|
||||
if (!ve)
|
||||
return false;
|
||||
|
||||
Creature *v = new Creature;
|
||||
Creature* v = new Creature;
|
||||
|
||||
Map *map = handler->GetSession()->GetPlayer()->GetMap();
|
||||
|
||||
@@ -877,7 +877,7 @@ public:
|
||||
uint32 guid = (uint32)atoi(e);
|
||||
uint32 index = (uint32)atoi(f);
|
||||
|
||||
Item *i = handler->GetSession()->GetPlayer()->GetItemByGuid(MAKE_NEW_GUID(guid, 0, HIGHGUID_ITEM));
|
||||
Item* i = handler->GetSession()->GetPlayer()->GetItemByGuid(MAKE_NEW_GUID(guid, 0, HIGHGUID_ITEM));
|
||||
|
||||
if (!i)
|
||||
return false;
|
||||
@@ -908,7 +908,7 @@ public:
|
||||
uint32 index = (uint32)atoi(f);
|
||||
uint32 value = (uint32)atoi(g);
|
||||
|
||||
Item *i = handler->GetSession()->GetPlayer()->GetItemByGuid(MAKE_NEW_GUID(guid, 0, HIGHGUID_ITEM));
|
||||
Item* i = handler->GetSession()->GetPlayer()->GetItemByGuid(MAKE_NEW_GUID(guid, 0, HIGHGUID_ITEM));
|
||||
|
||||
if (!i)
|
||||
return false;
|
||||
@@ -932,7 +932,7 @@ public:
|
||||
|
||||
uint32 guid = (uint32)atoi(e);
|
||||
|
||||
Item *i = handler->GetSession()->GetPlayer()->GetItemByGuid(MAKE_NEW_GUID(guid, 0, HIGHGUID_ITEM));
|
||||
Item* i = handler->GetSession()->GetPlayer()->GetItemByGuid(MAKE_NEW_GUID(guid, 0, HIGHGUID_ITEM));
|
||||
|
||||
if (!i)
|
||||
return false;
|
||||
|
||||
@@ -89,7 +89,7 @@ public:
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
Player *target = handler->getSelectedPlayer();
|
||||
Player* target = handler->getSelectedPlayer();
|
||||
if (!target)
|
||||
target = handler->GetSession()->GetPlayer();
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ public:
|
||||
if (!guid)
|
||||
{
|
||||
std::string name = pParam1;
|
||||
WorldDatabase.escape_string(name);
|
||||
WorldDatabase.EscapeString(name);
|
||||
whereClause << ", creature_template WHERE creature.id = creature_template.entry AND creature_template.name "_LIKE_" '" << name << "'";
|
||||
}
|
||||
else
|
||||
|
||||
@@ -139,7 +139,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
Player *chr = handler->GetSession()->GetPlayer();
|
||||
Player* chr = handler->GetSession()->GetPlayer();
|
||||
float x = float(chr->GetPositionX());
|
||||
float y = float(chr->GetPositionY());
|
||||
float z = float(chr->GetPositionZ());
|
||||
@@ -190,7 +190,7 @@ public:
|
||||
if (!charID)
|
||||
return false;
|
||||
|
||||
Player *chr = handler->GetSession()->GetPlayer();
|
||||
Player* chr = handler->GetSession()->GetPlayer();
|
||||
|
||||
char* spawntime = strtok(NULL, " ");
|
||||
uint32 spawntm = 300;
|
||||
@@ -233,7 +233,7 @@ public:
|
||||
else
|
||||
{
|
||||
std::string name = cId;
|
||||
WorldDatabase.escape_string(name);
|
||||
WorldDatabase.EscapeString(name);
|
||||
result = WorldDatabase.PQuery(
|
||||
"SELECT guid, id, position_x, position_y, position_z, orientation, map, phaseMask, (POW(position_x - %f, 2) + POW(position_y - %f, 2) + POW(position_z - %f, 2)) AS order_ "
|
||||
"FROM gameobject, gameobject_template WHERE gameobject_template.entry = gameobject.id AND map = %i AND name "_LIKE_" "_CONCAT3_("'%%'", "'%s'", "'%%'")" ORDER BY order_ ASC LIMIT 1",
|
||||
@@ -411,7 +411,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
Player *chr = handler->GetSession()->GetPlayer();
|
||||
Player* chr = handler->GetSession()->GetPlayer();
|
||||
o = chr->GetOrientation();
|
||||
}
|
||||
|
||||
@@ -459,7 +459,7 @@ public:
|
||||
|
||||
if (!px)
|
||||
{
|
||||
Player *chr = handler->GetSession()->GetPlayer();
|
||||
Player* chr = handler->GetSession()->GetPlayer();
|
||||
obj->Relocate(chr->GetPositionX(), chr->GetPositionY(), chr->GetPositionZ(), obj->GetOrientation());
|
||||
obj->DestroyForNearbyPlayers();
|
||||
obj->UpdateObjectVisibility();
|
||||
|
||||
@@ -124,7 +124,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleWPGPSCommand(ChatHandler* handler, const char *args)
|
||||
static bool HandleWPGPSCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
Player* player = handler->GetSession()->GetPlayer();
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
Player *target = handler->getSelectedPlayer();
|
||||
Player* target = handler->getSelectedPlayer();
|
||||
if (!target)
|
||||
{
|
||||
handler->SendSysMessage(LANG_PLAYER_NOT_FOUND);
|
||||
@@ -92,7 +92,7 @@ public:
|
||||
}
|
||||
static bool HandleHonorUpdateCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
Player *target = handler->getSelectedPlayer();
|
||||
Player* target = handler->getSelectedPlayer();
|
||||
if (!target)
|
||||
{
|
||||
handler->SendSysMessage(LANG_PLAYER_NOT_FOUND);
|
||||
|
||||
@@ -440,7 +440,7 @@ public:
|
||||
}
|
||||
else if (target->ToCreature()->isPet())
|
||||
{
|
||||
Unit *owner = target->GetOwner();
|
||||
Unit* owner = target->GetOwner();
|
||||
if (owner && owner->GetTypeId() == TYPEID_PLAYER && ((Pet *)target)->IsPermanentPetFor(owner->ToPlayer()))
|
||||
{
|
||||
// check online security
|
||||
@@ -698,15 +698,15 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
if (target->GetTypeId()==TYPEID_PLAYER)
|
||||
if (Player* player = target->ToPlayer())
|
||||
{
|
||||
// check online security
|
||||
if (handler->HasLowerSecurity((Player*)target, 0))
|
||||
if (handler->HasLowerSecurity(player, 0))
|
||||
return false;
|
||||
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_SIZE, Scale, handler->GetNameLink((Player*)target).c_str());
|
||||
if (handler->needReportToTarget((Player*)target))
|
||||
(ChatHandler((Player*)target)).PSendSysMessage(LANG_YOURS_SIZE_CHANGED, handler->GetNameLink().c_str(), Scale);
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_SIZE, Scale, handler->GetNameLink(player).c_str());
|
||||
if (handler->needReportToTarget(player))
|
||||
(ChatHandler(player)).PSendSysMessage(LANG_YOURS_SIZE_CHANGED, handler->GetNameLink().c_str(), Scale);
|
||||
}
|
||||
|
||||
target->SetFloatValue(OBJECT_FIELD_SCALE_X, Scale);
|
||||
|
||||
@@ -119,7 +119,7 @@ public:
|
||||
|
||||
uint32 id = atoi(charID);
|
||||
|
||||
Player *chr = handler->GetSession()->GetPlayer();
|
||||
Player* chr = handler->GetSession()->GetPlayer();
|
||||
float x = chr->GetPositionX();
|
||||
float y = chr->GetPositionY();
|
||||
float z = chr->GetPositionZ();
|
||||
@@ -495,7 +495,7 @@ public:
|
||||
static bool HandleNpcFollowCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
Player* player = handler->GetSession()->GetPlayer();
|
||||
Creature *creature = handler->getSelectedCreature();
|
||||
Creature* creature = handler->getSelectedCreature();
|
||||
|
||||
if (!creature)
|
||||
{
|
||||
@@ -667,7 +667,7 @@ public:
|
||||
|
||||
uint32 displayId = (uint32) atoi((char*)args);
|
||||
|
||||
Creature *pCreature = handler->getSelectedCreature();
|
||||
Creature* pCreature = handler->getSelectedCreature();
|
||||
|
||||
if (!pCreature || pCreature->isPet())
|
||||
{
|
||||
@@ -878,7 +878,7 @@ public:
|
||||
if (option >0.0f)
|
||||
mtype = RANDOM_MOTION_TYPE;
|
||||
|
||||
Creature *pCreature = handler->getSelectedCreature();
|
||||
Creature* pCreature = handler->getSelectedCreature();
|
||||
uint32 u_guidlow = 0;
|
||||
|
||||
if (pCreature)
|
||||
@@ -920,7 +920,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
Creature *pCreature = handler->getSelectedCreature();
|
||||
Creature* pCreature = handler->getSelectedCreature();
|
||||
uint32 u_guidlow = 0;
|
||||
|
||||
if (pCreature)
|
||||
@@ -986,7 +986,7 @@ public:
|
||||
static bool HandleNpcUnFollowCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
Player* player = handler->GetSession()->GetPlayer();
|
||||
Creature *creature = handler->getSelectedCreature();
|
||||
Creature* creature = handler->getSelectedCreature();
|
||||
|
||||
if (!creature)
|
||||
{
|
||||
@@ -1078,7 +1078,7 @@ public:
|
||||
if (!charID)
|
||||
return false;
|
||||
|
||||
Player *chr = handler->GetSession()->GetPlayer();
|
||||
Player* chr = handler->GetSession()->GetPlayer();
|
||||
|
||||
uint32 id = atoi(charID);
|
||||
if (!id)
|
||||
@@ -1092,7 +1092,7 @@ public:
|
||||
//npc tame handling
|
||||
static bool HandleNpcTameCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
Creature *creatureTarget = handler->getSelectedCreature ();
|
||||
Creature* creatureTarget = handler->getSelectedCreature ();
|
||||
if (!creatureTarget || creatureTarget->isPet ())
|
||||
{
|
||||
handler->PSendSysMessage (LANG_SELECT_CREATURE);
|
||||
@@ -1162,7 +1162,7 @@ public:
|
||||
return false;
|
||||
|
||||
uint32 leaderGUID = (uint32) atoi((char*)args);
|
||||
Creature *pCreature = handler->getSelectedCreature();
|
||||
Creature* pCreature = handler->getSelectedCreature();
|
||||
|
||||
if (!pCreature || !pCreature->GetDBTableGUIDLow())
|
||||
{
|
||||
@@ -1181,7 +1181,7 @@ public:
|
||||
if (!lowguid)
|
||||
return false;
|
||||
|
||||
Player *chr = handler->GetSession()->GetPlayer();
|
||||
Player* chr = handler->GetSession()->GetPlayer();
|
||||
FormationInfo *group_member;
|
||||
|
||||
group_member = new FormationInfo;
|
||||
@@ -1248,7 +1248,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
Creature *pCreature = ObjectAccessor::GetCreature(*handler->GetSession()->GetPlayer(), guid);
|
||||
Creature* pCreature = ObjectAccessor::GetCreature(*handler->GetSession()->GetPlayer(), guid);
|
||||
|
||||
if (!pCreature)
|
||||
{
|
||||
|
||||
@@ -228,7 +228,7 @@ public:
|
||||
|
||||
for (GroupReference *itr = grp->GetFirstMember(); itr != NULL; itr = itr->next())
|
||||
{
|
||||
Player *pl = itr->getSource();
|
||||
Player* pl = itr->getSource();
|
||||
|
||||
if (!pl || !pl->GetSession())
|
||||
continue;
|
||||
|
||||
@@ -210,7 +210,7 @@ public:
|
||||
|
||||
sscanf((char*)args, UI64FMTD, &titles);
|
||||
|
||||
Player *target = handler->getSelectedPlayer();
|
||||
Player* target = handler->getSelectedPlayer();
|
||||
if (!target)
|
||||
{
|
||||
handler->SendSysMessage(LANG_NO_CHAR_SELECTED);
|
||||
|
||||
@@ -434,7 +434,7 @@ public:
|
||||
else
|
||||
{
|
||||
std::string arg_str_3 = arg_3;
|
||||
WorldDatabase.escape_string(arg_str_3);
|
||||
WorldDatabase.EscapeString(arg_str_3);
|
||||
WorldDatabase.PExecute("UPDATE waypoint_scripts SET %s='%s' WHERE guid='%u'",
|
||||
arg_2, arg_str_3.c_str(), id);
|
||||
}
|
||||
@@ -569,7 +569,7 @@ public:
|
||||
{
|
||||
handler->PSendSysMessage("|cff00ff00DEBUG: wp move, PathID: |r|cff00ffff%u|r", pathid);
|
||||
|
||||
Player *chr = handler->GetSession()->GetPlayer();
|
||||
Player* chr = handler->GetSession()->GetPlayer();
|
||||
Map *map = chr->GetMap();
|
||||
{
|
||||
// wpCreature
|
||||
@@ -619,7 +619,7 @@ public:
|
||||
{
|
||||
// show_str check for present in list of correct values, no sql injection possible
|
||||
std::string text2 = text;
|
||||
WorldDatabase.escape_string(text2);
|
||||
WorldDatabase.EscapeString(text2);
|
||||
WorldDatabase.PExecute("UPDATE waypoint_data SET %s='%s' WHERE id='%u' AND point='%u'",
|
||||
show_str, text2.c_str(), pathid, point);
|
||||
}
|
||||
@@ -776,7 +776,7 @@ public:
|
||||
|
||||
uint32 id = VISUAL_WAYPOINT;
|
||||
|
||||
Player *chr = handler->GetSession()->GetPlayer();
|
||||
Player* chr = handler->GetSession()->GetPlayer();
|
||||
Map *map = chr->GetMap();
|
||||
float o = chr->GetOrientation();
|
||||
|
||||
@@ -827,7 +827,7 @@ public:
|
||||
float z = fields[2].GetFloat();
|
||||
uint32 id = VISUAL_WAYPOINT;
|
||||
|
||||
Player *chr = handler->GetSession()->GetPlayer();
|
||||
Player* chr = handler->GetSession()->GetPlayer();
|
||||
float o = chr->GetOrientation();
|
||||
Map *map = chr->GetMap();
|
||||
|
||||
@@ -875,7 +875,7 @@ public:
|
||||
float z = fields[2].GetFloat();
|
||||
uint32 id = VISUAL_WAYPOINT;
|
||||
|
||||
Player *chr = handler->GetSession()->GetPlayer();
|
||||
Player* chr = handler->GetSession()->GetPlayer();
|
||||
float o = chr->GetOrientation();
|
||||
Map *map = chr->GetMap();
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ class mob_av_marshal_or_warmaster : public CreatureScript
|
||||
|
||||
struct mob_av_marshal_or_warmasterAI : public ScriptedAI
|
||||
{
|
||||
mob_av_marshal_or_warmasterAI(Creature *c) : ScriptedAI(c) {}
|
||||
mob_av_marshal_or_warmasterAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 uiChargeTimer;
|
||||
uint32 uiCleaveTimer;
|
||||
|
||||
@@ -48,7 +48,7 @@ public:
|
||||
|
||||
struct mob_water_elementalAI : public ScriptedAI
|
||||
{
|
||||
mob_water_elementalAI(Creature *c) : ScriptedAI(c) {}
|
||||
mob_water_elementalAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 uiWaterBoltTimer;
|
||||
uint64 uiBalindaGUID;
|
||||
@@ -74,7 +74,7 @@ public:
|
||||
// check if creature is not outside of building
|
||||
if (uiResetTimer < diff)
|
||||
{
|
||||
if (Creature *pBalinda = Unit::GetCreature(*me, uiBalindaGUID))
|
||||
if (Creature* pBalinda = Unit::GetCreature(*me, uiBalindaGUID))
|
||||
if (me->GetDistance2d(pBalinda->GetHomePosition().GetPositionX(), pBalinda->GetHomePosition().GetPositionY()) > 50)
|
||||
EnterEvadeMode();
|
||||
uiResetTimer = 5*IN_MILLISECONDS;
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI *GetAI(Creature *creature) const
|
||||
CreatureAI *GetAI(Creature* creature) const
|
||||
{
|
||||
return new mob_water_elementalAI(creature);
|
||||
}
|
||||
@@ -97,7 +97,7 @@ public:
|
||||
|
||||
struct boss_balindaAI : public ScriptedAI
|
||||
{
|
||||
boss_balindaAI(Creature *c) : ScriptedAI(c), Summons(me) {}
|
||||
boss_balindaAI(Creature* c) : ScriptedAI(c), Summons(me) {}
|
||||
|
||||
uint32 uiArcaneExplosionTimer;
|
||||
uint32 uiConeOfColdTimer;
|
||||
@@ -194,7 +194,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI *GetAI(Creature *creature) const
|
||||
CreatureAI *GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_balindaAI(creature);
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ public:
|
||||
|
||||
struct boss_drektharAI : public ScriptedAI
|
||||
{
|
||||
boss_drektharAI(Creature *c) : ScriptedAI(c) {}
|
||||
boss_drektharAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 uiWhirlwindTimer;
|
||||
uint32 uiWhirlwind2Timer;
|
||||
@@ -128,7 +128,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI *GetAI(Creature *creature) const
|
||||
CreatureAI *GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_drektharAI(creature);
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ public:
|
||||
|
||||
struct boss_galvangarAI : public ScriptedAI
|
||||
{
|
||||
boss_galvangarAI(Creature *c) : ScriptedAI(c) {}
|
||||
boss_galvangarAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 uiCleaveTimer;
|
||||
uint32 uiFrighteningShoutTimer;
|
||||
@@ -118,7 +118,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI *GetAI(Creature *creature) const
|
||||
CreatureAI *GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_galvangarAI(creature);
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ public:
|
||||
|
||||
struct boss_vanndarAI : public ScriptedAI
|
||||
{
|
||||
boss_vanndarAI(Creature *c) : ScriptedAI(c) {}
|
||||
boss_vanndarAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 uiAvatarTimer;
|
||||
uint32 uiThunderclapTimer;
|
||||
@@ -118,7 +118,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI *GetAI(Creature *creature) const
|
||||
CreatureAI *GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_vanndarAI(creature);
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ public:
|
||||
|
||||
struct npc_grimstoneAI : public npc_escortAI
|
||||
{
|
||||
npc_grimstoneAI(Creature *c) : npc_escortAI(c)
|
||||
npc_grimstoneAI(Creature* c) : npc_escortAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
MobSpawnId = rand()%6;
|
||||
@@ -263,7 +263,7 @@ public:
|
||||
|
||||
if (RingBossGUID)
|
||||
{
|
||||
Creature *boss = Unit::GetCreature(*me, RingBossGUID);
|
||||
Creature* boss = Unit::GetCreature(*me, RingBossGUID);
|
||||
if (boss && !boss->isAlive() && boss->isDead())
|
||||
{
|
||||
RingBossGUID = 0;
|
||||
@@ -276,7 +276,7 @@ public:
|
||||
|
||||
for (uint8 i = 0; i < MAX_MOB_AMOUNT; ++i)
|
||||
{
|
||||
Creature *mob = Unit::GetCreature(*me, RingMobGUID[i]);
|
||||
Creature* mob = Unit::GetCreature(*me, RingMobGUID[i]);
|
||||
if (mob && !mob->isAlive() && mob->isDead())
|
||||
{
|
||||
RingMobGUID[i] = 0;
|
||||
@@ -391,7 +391,7 @@ public:
|
||||
|
||||
struct mob_phalanxAI : public ScriptedAI
|
||||
{
|
||||
mob_phalanxAI(Creature *c) : ScriptedAI(c) {}
|
||||
mob_phalanxAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 ThunderClap_Timer;
|
||||
uint32 FireballVolley_Timer;
|
||||
@@ -658,7 +658,7 @@ public:
|
||||
|
||||
struct npc_dughal_stormwingAI : public npc_escortAI
|
||||
{
|
||||
npc_dughal_stormwingAI(Creature *c) : npc_escortAI(c) {}
|
||||
npc_dughal_stormwingAI(Creature* c) : npc_escortAI(c) {}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
@@ -778,7 +778,7 @@ public:
|
||||
|
||||
struct npc_marshal_windsorAI : public npc_escortAI
|
||||
{
|
||||
npc_marshal_windsorAI(Creature *c) : npc_escortAI(c)
|
||||
npc_marshal_windsorAI(Creature* c) : npc_escortAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -840,7 +840,7 @@ public:
|
||||
|
||||
void Reset() {}
|
||||
|
||||
void JustDied(Unit *slayer)
|
||||
void JustDied(Unit* slayer)
|
||||
{
|
||||
pInstance->SetData(DATA_QUEST_JAIL_BREAK, ENCOUNTER_STATE_FAILED);
|
||||
}
|
||||
@@ -952,7 +952,7 @@ public:
|
||||
|
||||
struct npc_marshal_reginald_windsorAI : public npc_escortAI
|
||||
{
|
||||
npc_marshal_reginald_windsorAI(Creature *c) : npc_escortAI(c)
|
||||
npc_marshal_reginald_windsorAI(Creature* c) : npc_escortAI(c)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1014,7 +1014,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (HasEscortState(STATE_ESCORT_ESCORTING))
|
||||
return;
|
||||
@@ -1044,7 +1044,7 @@ public:
|
||||
}
|
||||
void Reset() {}
|
||||
|
||||
void JustDied(Unit *slayer)
|
||||
void JustDied(Unit* slayer)
|
||||
{
|
||||
pInstance->SetData(DATA_QUEST_JAIL_BREAK, ENCOUNTER_STATE_FAILED);
|
||||
}
|
||||
@@ -1148,7 +1148,7 @@ public:
|
||||
|
||||
struct npc_tobias_seecherAI : public npc_escortAI
|
||||
{
|
||||
npc_tobias_seecherAI(Creature *c) :npc_escortAI(c) {}
|
||||
npc_tobias_seecherAI(Creature* c) :npc_escortAI(c) {}
|
||||
|
||||
void EnterCombat(Unit* who) {}
|
||||
void Reset() {}
|
||||
@@ -1263,7 +1263,7 @@ public:
|
||||
|
||||
struct npc_rocknotAI : public npc_escortAI
|
||||
{
|
||||
npc_rocknotAI(Creature *c) : npc_escortAI(c)
|
||||
npc_rocknotAI(Creature* c) : npc_escortAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -1337,7 +1337,7 @@ public:
|
||||
DoGo(DATA_GO_BAR_KEG_TRAP, 0); //doesn't work very well, leaving code here for future
|
||||
//spell by trap has effect61, this indicate the bar go hostile
|
||||
|
||||
if (Unit *tmp = Unit::GetUnit(*me, pInstance->GetData64(DATA_PHALANX)))
|
||||
if (Unit* tmp = Unit::GetUnit(*me, pInstance->GetData64(DATA_PHALANX)))
|
||||
tmp->setFaction(14);
|
||||
|
||||
//for later, this event(s) has alot more to it.
|
||||
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
|
||||
struct boss_ambassador_flamelashAI : public ScriptedAI
|
||||
{
|
||||
boss_ambassador_flamelashAI(Creature *c) : ScriptedAI(c) {}
|
||||
boss_ambassador_flamelashAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 FireBlast_Timer;
|
||||
uint32 Spirit_Timer;
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
|
||||
void SummonSpirits(Unit* victim)
|
||||
{
|
||||
if (Creature *Spirit = DoSpawnCreature(9178, float(irand(-9, 9)), float(irand(-9, 9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000))
|
||||
if (Creature* Spirit = DoSpawnCreature(9178, float(irand(-9, 9)), float(irand(-9, 9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000))
|
||||
Spirit->AI()->AttackStart(victim);
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ public:
|
||||
|
||||
struct boss_anubshiahAI : public ScriptedAI
|
||||
{
|
||||
boss_anubshiahAI(Creature *c) : ScriptedAI(c) {}
|
||||
boss_anubshiahAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 ShadowBolt_Timer;
|
||||
uint32 CurseOfTongues_Timer;
|
||||
@@ -83,7 +83,7 @@ public:
|
||||
//CurseOfTongues_Timer
|
||||
if (CurseOfTongues_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(pTarget, SPELL_CURSEOFTONGUES);
|
||||
CurseOfTongues_Timer = 18000;
|
||||
} else CurseOfTongues_Timer -= diff;
|
||||
@@ -105,7 +105,7 @@ public:
|
||||
//EnvelopingWeb_Timer
|
||||
if (EnvelopingWeb_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(pTarget, SPELL_ENVELOPINGWEB);
|
||||
EnvelopingWeb_Timer = 12000;
|
||||
} else EnvelopingWeb_Timer -= diff;
|
||||
|
||||
+2
-2
@@ -49,7 +49,7 @@ public:
|
||||
|
||||
struct boss_draganthaurissanAI : public ScriptedAI
|
||||
{
|
||||
boss_draganthaurissanAI(Creature *c) : ScriptedAI(c) {}
|
||||
boss_draganthaurissanAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 HandOfThaurissan_Timer;
|
||||
uint32 AvatarOfFlame_Timer;
|
||||
@@ -81,7 +81,7 @@ public:
|
||||
|
||||
if (HandOfThaurissan_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_HANDOFTHAURISSAN);
|
||||
|
||||
//3 Hands of Thaurissan will be casted
|
||||
|
||||
@@ -44,7 +44,7 @@ public:
|
||||
|
||||
struct boss_general_angerforgeAI : public ScriptedAI
|
||||
{
|
||||
boss_general_angerforgeAI(Creature *c) : ScriptedAI(c) {}
|
||||
boss_general_angerforgeAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 MightyBlow_Timer;
|
||||
uint32 HamString_Timer;
|
||||
@@ -67,13 +67,13 @@ public:
|
||||
|
||||
void SummonAdds(Unit* victim)
|
||||
{
|
||||
if (Creature *SummonedAdd = DoSpawnCreature(8901, float(irand(-14, 14)), float(irand(-14, 14)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000))
|
||||
if (Creature* SummonedAdd = DoSpawnCreature(8901, float(irand(-14, 14)), float(irand(-14, 14)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000))
|
||||
SummonedAdd->AI()->AttackStart(victim);
|
||||
}
|
||||
|
||||
void SummonMedics(Unit* victim)
|
||||
{
|
||||
if (Creature *SummonedMedic = DoSpawnCreature(8894, float(irand(-9, 9)), float(irand(-9, 9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000))
|
||||
if (Creature* SummonedMedic = DoSpawnCreature(8894, float(irand(-9, 9)), float(irand(-9, 9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000))
|
||||
SummonedMedic->AI()->AttackStart(victim);
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ public:
|
||||
|
||||
struct boss_gorosh_the_dervishAI : public ScriptedAI
|
||||
{
|
||||
boss_gorosh_the_dervishAI(Creature *c) : ScriptedAI(c) {}
|
||||
boss_gorosh_the_dervishAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 WhirlWind_Timer;
|
||||
uint32 MortalStrike_Timer;
|
||||
|
||||
@@ -43,7 +43,7 @@ public:
|
||||
|
||||
struct boss_grizzleAI : public ScriptedAI
|
||||
{
|
||||
boss_grizzleAI(Creature *c) : ScriptedAI(c) {}
|
||||
boss_grizzleAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 GroundTremor_Timer;
|
||||
uint32 Frenzy_Timer;
|
||||
|
||||
+3
-3
@@ -45,7 +45,7 @@ public:
|
||||
|
||||
struct boss_high_interrogator_gerstahnAI : public ScriptedAI
|
||||
{
|
||||
boss_high_interrogator_gerstahnAI(Creature *c) : ScriptedAI(c) {}
|
||||
boss_high_interrogator_gerstahnAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 ShadowWordPain_Timer;
|
||||
uint32 ManaBurn_Timer;
|
||||
@@ -73,7 +73,7 @@ public:
|
||||
//ShadowWordPain_Timer
|
||||
if (ShadowWordPain_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(pTarget, SPELL_SHADOWWORDPAIN);
|
||||
ShadowWordPain_Timer = 7000;
|
||||
} else ShadowWordPain_Timer -= diff;
|
||||
@@ -81,7 +81,7 @@ public:
|
||||
//ManaBurn_Timer
|
||||
if (ManaBurn_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(pTarget, SPELL_MANABURN);
|
||||
ManaBurn_Timer = 10000;
|
||||
} else ManaBurn_Timer -= diff;
|
||||
|
||||
@@ -48,7 +48,7 @@ public:
|
||||
|
||||
struct boss_magmusAI : public ScriptedAI
|
||||
{
|
||||
boss_magmusAI(Creature *c) : ScriptedAI(c) {}
|
||||
boss_magmusAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 FieryBurst_Timer;
|
||||
uint32 WarStomp_Timer;
|
||||
@@ -89,7 +89,7 @@ public:
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
// When he die open door to last chamber
|
||||
void JustDied(Unit *who)
|
||||
void JustDied(Unit* who)
|
||||
{
|
||||
if (InstanceScript* pInstance = who->GetInstanceScript())
|
||||
pInstance->HandleGameObject(pInstance->GetData64(DATA_THRONE_DOOR), true);
|
||||
|
||||
@@ -47,7 +47,7 @@ public:
|
||||
|
||||
struct boss_moira_bronzebeardAI : public ScriptedAI
|
||||
{
|
||||
boss_moira_bronzebeardAI(Creature *c) : ScriptedAI(c) {}
|
||||
boss_moira_bronzebeardAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 Heal_Timer;
|
||||
uint32 MindBlast_Timer;
|
||||
|
||||
@@ -150,7 +150,7 @@ public:
|
||||
|
||||
struct boss_doomrelAI : public ScriptedAI
|
||||
{
|
||||
boss_doomrelAI(Creature *c) : ScriptedAI(c)
|
||||
boss_doomrelAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -222,7 +222,7 @@ public:
|
||||
//Immolate_Timer
|
||||
if (Immolate_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(pTarget, SPELL_IMMOLATE);
|
||||
|
||||
Immolate_Timer = 25000;
|
||||
|
||||
@@ -378,7 +378,7 @@ public:
|
||||
{
|
||||
boss->setFaction(FACTION_HOSTILE);
|
||||
boss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
|
||||
if (Unit *pTarget = boss->SelectNearestTarget(500))
|
||||
if (Unit* pTarget = boss->SelectNearestTarget(500))
|
||||
boss->AI()->AttackStart(pTarget);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_CURSE_OF_BLOOD, 45*IN_MILLISECONDS);
|
||||
break;
|
||||
case EVENT_HEX:
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(pTarget, SPELL_HEX);
|
||||
events.ScheduleEvent(EVENT_HEX, 15*IN_MILLISECONDS);
|
||||
break;
|
||||
|
||||
@@ -45,7 +45,7 @@ public:
|
||||
|
||||
struct boss_broodlordAI : public ScriptedAI
|
||||
{
|
||||
boss_broodlordAI(Creature *c) : ScriptedAI(c) {}
|
||||
boss_broodlordAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 Cleave_Timer;
|
||||
uint32 BlastWave_Timer;
|
||||
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
|
||||
struct boss_chromaggusAI : public ScriptedAI
|
||||
{
|
||||
boss_chromaggusAI(Creature *c) : ScriptedAI(c)
|
||||
boss_chromaggusAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
//Select the 2 breaths that we are going to use until despawned
|
||||
//5 possiblities for the first breath, 4 for the second, 20 total possiblites
|
||||
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
|
||||
struct boss_ebonrocAI : public ScriptedAI
|
||||
{
|
||||
boss_ebonrocAI(Creature *c) : ScriptedAI(c) {}
|
||||
boss_ebonrocAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 ShadowFlame_Timer;
|
||||
uint32 WingBuffet_Timer;
|
||||
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
|
||||
struct boss_firemawAI : public ScriptedAI
|
||||
{
|
||||
boss_firemawAI(Creature *c) : ScriptedAI(c) {}
|
||||
boss_firemawAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 ShadowFlame_Timer;
|
||||
uint32 WingBuffet_Timer;
|
||||
|
||||
@@ -43,7 +43,7 @@ public:
|
||||
|
||||
struct boss_flamegorAI : public ScriptedAI
|
||||
{
|
||||
boss_flamegorAI(Creature *c) : ScriptedAI(c) {}
|
||||
boss_flamegorAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 ShadowFlame_Timer;
|
||||
uint32 WingBuffet_Timer;
|
||||
|
||||
@@ -72,7 +72,7 @@ public:
|
||||
|
||||
struct boss_nefarianAI : public ScriptedAI
|
||||
{
|
||||
boss_nefarianAI(Creature *c) : ScriptedAI(c) {}
|
||||
boss_nefarianAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 ShadowFlame_Timer;
|
||||
uint32 BellowingRoar_Timer;
|
||||
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
|
||||
struct boss_razorgoreAI : public ScriptedAI
|
||||
{
|
||||
boss_razorgoreAI(Creature *c) : ScriptedAI(c) {}
|
||||
boss_razorgoreAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 Cleave_Timer;
|
||||
uint32 WarStomp_Timer;
|
||||
@@ -114,7 +114,7 @@ public:
|
||||
|
||||
// Aura Check. If the gamer is affected by confliguration we attack a random gamer.
|
||||
if (me->getVictim() && me->getVictim()->HasAura(SPELL_CONFLAGRATION))
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true))
|
||||
me->TauntApply(pTarget);
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
|
||||
@@ -81,7 +81,7 @@ public:
|
||||
|
||||
struct boss_vaelAI : public ScriptedAI
|
||||
{
|
||||
boss_vaelAI(Creature *c) : ScriptedAI(c)
|
||||
boss_vaelAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
c->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
c->setFaction(35);
|
||||
@@ -115,7 +115,7 @@ public:
|
||||
DoingSpeech = false;
|
||||
}
|
||||
|
||||
void BeginSpeech(Unit *pTarget)
|
||||
void BeginSpeech(Unit* pTarget)
|
||||
{
|
||||
//Stand up and begin speach
|
||||
PlayerGUID = pTarget->GetGUID();
|
||||
@@ -208,7 +208,7 @@ public:
|
||||
//BurningAdrenalineCaster_Timer
|
||||
if (BurningAdrenalineCaster_Timer <= diff)
|
||||
{
|
||||
Unit *pTarget = NULL;
|
||||
Unit* pTarget = NULL;
|
||||
|
||||
uint8 i = 0;
|
||||
while (i < 3) // max 3 tries to get a random target with power_mana
|
||||
|
||||
@@ -110,7 +110,7 @@ public:
|
||||
|
||||
struct boss_victor_nefariusAI : public ScriptedAI
|
||||
{
|
||||
boss_victor_nefariusAI(Creature *c) : ScriptedAI(c)
|
||||
boss_victor_nefariusAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
NefarianGUID = 0;
|
||||
switch (urand(0, 19))
|
||||
@@ -224,7 +224,7 @@ public:
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
|
||||
void BeginEvent(Player *pTarget)
|
||||
void BeginEvent(Player* pTarget)
|
||||
{
|
||||
DoScriptText(SAY_GAMESBEGIN_2, me);
|
||||
|
||||
@@ -247,7 +247,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
//We simply use this function to find players until we can use pMap->GetPlayers()
|
||||
|
||||
@@ -269,7 +269,7 @@ public:
|
||||
//ShadowBoltTimer
|
||||
if (ShadowBoltTimer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(pTarget, SPELL_SHADOWBOLT);
|
||||
|
||||
ShadowBoltTimer = urand(3000, 10000);
|
||||
@@ -278,7 +278,7 @@ public:
|
||||
//FearTimer
|
||||
if (FearTimer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(pTarget, SPELL_FEAR);
|
||||
|
||||
FearTimer = 10000 + (rand()%10000);
|
||||
@@ -290,7 +290,7 @@ public:
|
||||
//Spawn 2 random types of creatures at the 2 locations
|
||||
uint32 CreatureID;
|
||||
Creature* Spawned = NULL;
|
||||
Unit *pTarget = NULL;
|
||||
Unit* pTarget = NULL;
|
||||
|
||||
//1 in 3 chance it will be a chromatic
|
||||
if (urand(0, 2) == 0)
|
||||
|
||||
@@ -174,9 +174,9 @@ public:
|
||||
{
|
||||
if (pGo)
|
||||
{
|
||||
if (Creature *trigger = pGo->SummonTrigger(pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), 0, 1))
|
||||
if (Creature* trigger = pGo->SummonTrigger(pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), 0, 1))
|
||||
{
|
||||
//visual effects are not working! ¬¬
|
||||
//visual effects are not working!
|
||||
trigger->CastSpell(trigger, 11542, true);
|
||||
trigger->CastSpell(trigger, 35470, true);
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
|
||||
struct boss_curatorAI : public ScriptedAI
|
||||
{
|
||||
boss_curatorAI(Creature *c) : ScriptedAI(c) {}
|
||||
boss_curatorAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 AddTimer;
|
||||
uint32 HatefulBoltTimer;
|
||||
@@ -132,7 +132,7 @@ public:
|
||||
{
|
||||
//Summon Astral Flare
|
||||
Creature* AstralFlare = DoSpawnCreature(17096, float(rand()%37), float(rand()%37), 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
Unit *pTarget = NULL;
|
||||
Unit* pTarget = NULL;
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
|
||||
if (AstralFlare && pTarget)
|
||||
@@ -184,7 +184,7 @@ public:
|
||||
else
|
||||
HatefulBoltTimer = 15000;
|
||||
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_TOPAGGRO, 1))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_TOPAGGRO, 1))
|
||||
DoCast(pTarget, SPELL_HATEFUL_BOLT);
|
||||
|
||||
} else HatefulBoltTimer -= diff;
|
||||
|
||||
@@ -51,7 +51,7 @@ public:
|
||||
|
||||
struct boss_maiden_of_virtueAI : public ScriptedAI
|
||||
{
|
||||
boss_maiden_of_virtueAI(Creature *c) : ScriptedAI(c) {}
|
||||
boss_maiden_of_virtueAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 Repentance_Timer;
|
||||
uint32 Holyfire_Timer;
|
||||
@@ -115,7 +115,7 @@ public:
|
||||
|
||||
if (Holyfire_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(pTarget, SPELL_HOLYFIRE);
|
||||
|
||||
Holyfire_Timer = urand(8000, 23000); //Anywhere from 8 to 23 seconds, good luck having several of those in a row!
|
||||
@@ -123,7 +123,7 @@ public:
|
||||
|
||||
if (Holywrath_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(pTarget, SPELL_HOLYWRATH);
|
||||
|
||||
Holywrath_Timer = urand(20000, 25000); //20-30 secs sounds nice
|
||||
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
|
||||
struct boss_attumenAI : public ScriptedAI
|
||||
{
|
||||
boss_attumenAI(Creature *c) : ScriptedAI(c)
|
||||
boss_attumenAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
Phase = 1;
|
||||
|
||||
@@ -92,7 +92,7 @@ public:
|
||||
void JustDied(Unit* /*victim*/)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
if (Unit *pMidnight = Unit::GetUnit(*me, Midnight))
|
||||
if (Unit* pMidnight = Unit::GetUnit(*me, Midnight))
|
||||
pMidnight->Kill(pMidnight);
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ public:
|
||||
|
||||
struct boss_midnightAI : public ScriptedAI
|
||||
{
|
||||
boss_midnightAI(Creature *c) : ScriptedAI(c) {}
|
||||
boss_midnightAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint64 Attumen;
|
||||
uint8 Phase;
|
||||
@@ -141,7 +141,7 @@ public:
|
||||
{
|
||||
if (Phase == 2)
|
||||
{
|
||||
if (Unit *pUnit = Unit::GetUnit(*me, Attumen))
|
||||
if (Unit* pUnit = Unit::GetUnit(*me, Attumen))
|
||||
DoScriptText(SAY_MIDNIGHT_KILL, pUnit);
|
||||
}
|
||||
}
|
||||
@@ -164,7 +164,7 @@ public:
|
||||
}
|
||||
else if (Phase == 2 && HealthBelowPct(25))
|
||||
{
|
||||
if (Unit *pAttumen = Unit::GetUnit(*me, Attumen))
|
||||
if (Unit* pAttumen = Unit::GetUnit(*me, Attumen))
|
||||
Mount(pAttumen);
|
||||
}
|
||||
else if (Phase == 3)
|
||||
@@ -176,7 +176,7 @@ public:
|
||||
Mount_Timer = 0;
|
||||
me->SetVisible(false);
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
if (Unit *pAttumen = Unit::GetUnit(*me, Attumen))
|
||||
if (Unit* pAttumen = Unit::GetUnit(*me, Attumen))
|
||||
{
|
||||
pAttumen->SetDisplayId(MOUNTED_DISPLAYID);
|
||||
pAttumen->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
@@ -195,7 +195,7 @@ public:
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void Mount(Unit *pAttumen)
|
||||
void Mount(Unit* pAttumen)
|
||||
{
|
||||
DoScriptText(SAY_MOUNT, pAttumen);
|
||||
Phase = 3;
|
||||
@@ -220,7 +220,7 @@ public:
|
||||
Mount_Timer = 1000;
|
||||
}
|
||||
|
||||
void SetMidnight(Creature *pAttumen, uint64 value)
|
||||
void SetMidnight(Creature* pAttumen, uint64 value)
|
||||
{
|
||||
CAST_AI(boss_attumen::boss_attumenAI, pAttumen->AI())->Midnight = value;
|
||||
}
|
||||
@@ -235,7 +235,7 @@ void boss_attumen::boss_attumenAI::UpdateAI(const uint32 diff)
|
||||
if (ResetTimer <= diff)
|
||||
{
|
||||
ResetTimer = 0;
|
||||
Unit *pMidnight = Unit::GetUnit(*me, Midnight);
|
||||
Unit* pMidnight = Unit::GetUnit(*me, Midnight);
|
||||
if (pMidnight)
|
||||
{
|
||||
pMidnight->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
@@ -276,9 +276,9 @@ void boss_attumen::boss_attumenAI::UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (ChargeTimer <= diff)
|
||||
{
|
||||
Unit *pTarget = NULL;
|
||||
Unit* pTarget = NULL;
|
||||
std::list<HostileReference *> t_list = me->getThreatManager().getThreatList();
|
||||
std::vector<Unit *> target_list;
|
||||
std::vector<Unit* > target_list;
|
||||
for (std::list<HostileReference *>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
|
||||
{
|
||||
pTarget = Unit::GetUnit(*me, (*itr)->getUnitGuid());
|
||||
@@ -297,7 +297,7 @@ void boss_attumen::boss_attumenAI::UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (HealthBelowPct(25))
|
||||
{
|
||||
Creature *pMidnight = Unit::GetCreature(*me, Midnight);
|
||||
Creature* pMidnight = Unit::GetCreature(*me, Midnight);
|
||||
if (pMidnight && pMidnight->GetTypeId() == TYPEID_UNIT)
|
||||
{
|
||||
CAST_AI(boss_midnight::boss_midnightAI, (pMidnight->AI()))->Mount(me);
|
||||
|
||||
@@ -72,7 +72,7 @@ public:
|
||||
|
||||
struct boss_moroesAI : public ScriptedAI
|
||||
{
|
||||
boss_moroesAI(Creature *c) : ScriptedAI(c)
|
||||
boss_moroesAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
{
|
||||
@@ -155,7 +155,7 @@ public:
|
||||
DeSpawnAdds();
|
||||
if (isAddlistEmpty())
|
||||
{
|
||||
Creature *pCreature = NULL;
|
||||
Creature* pCreature = NULL;
|
||||
std::vector<uint32> AddList;
|
||||
|
||||
for (uint8 i = 0; i < 6; ++i)
|
||||
@@ -181,7 +181,7 @@ public:
|
||||
{
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
{
|
||||
Creature *pCreature = me->SummonCreature(AddId[i], Locations[i][0], Locations[i][1], POS_Z, Locations[i][2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
|
||||
Creature* pCreature = me->SummonCreature(AddId[i], Locations[i][0], Locations[i][1], POS_Z, Locations[i][2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
|
||||
if (pCreature)
|
||||
{
|
||||
AddGUID[i] = pCreature->GetGUID();
|
||||
@@ -302,7 +302,7 @@ public:
|
||||
{
|
||||
DoScriptText(RAND(SAY_SPECIAL_1, SAY_SPECIAL_2), me);
|
||||
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
pTarget->CastSpell(pTarget, SPELL_GARROTE, true);
|
||||
|
||||
InVanish = false;
|
||||
@@ -417,7 +417,7 @@ public:
|
||||
struct boss_baroness_dorothea_millstipeAI : public boss_moroes_guestAI
|
||||
{
|
||||
//Shadow Priest
|
||||
boss_baroness_dorothea_millstipeAI(Creature *c) : boss_moroes_guestAI(c) {}
|
||||
boss_baroness_dorothea_millstipeAI(Creature* c) : boss_moroes_guestAI(c) {}
|
||||
|
||||
uint32 ManaBurn_Timer;
|
||||
uint32 MindFlay_Timer;
|
||||
@@ -449,7 +449,7 @@ public:
|
||||
|
||||
if (ManaBurn_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (pTarget->getPowerType() == POWER_MANA)
|
||||
DoCast(pTarget, SPELL_MANABURN);
|
||||
ManaBurn_Timer = 5000; // 3 sec cast
|
||||
@@ -457,7 +457,7 @@ public:
|
||||
|
||||
if (ShadowWordPain_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
{
|
||||
DoCast(pTarget, SPELL_SWPAIN);
|
||||
ShadowWordPain_Timer = 7000;
|
||||
@@ -481,7 +481,7 @@ public:
|
||||
struct boss_baron_rafe_dreugerAI : public boss_moroes_guestAI
|
||||
{
|
||||
//Retr Pally
|
||||
boss_baron_rafe_dreugerAI(Creature *c) : boss_moroes_guestAI(c){}
|
||||
boss_baron_rafe_dreugerAI(Creature* c) : boss_moroes_guestAI(c){}
|
||||
|
||||
uint32 HammerOfJustice_Timer;
|
||||
uint32 SealOfCommand_Timer;
|
||||
@@ -539,7 +539,7 @@ public:
|
||||
struct boss_lady_catriona_von_indiAI : public boss_moroes_guestAI
|
||||
{
|
||||
//Holy Priest
|
||||
boss_lady_catriona_von_indiAI(Creature *c) : boss_moroes_guestAI(c) {}
|
||||
boss_lady_catriona_von_indiAI(Creature* c) : boss_moroes_guestAI(c) {}
|
||||
|
||||
uint32 DispelMagic_Timer;
|
||||
uint32 GreaterHeal_Timer;
|
||||
@@ -573,7 +573,7 @@ public:
|
||||
|
||||
if (GreaterHeal_Timer <= diff)
|
||||
{
|
||||
Unit *pTarget = SelectGuestTarget();
|
||||
Unit* pTarget = SelectGuestTarget();
|
||||
|
||||
DoCast(pTarget, SPELL_GREATERHEAL);
|
||||
GreaterHeal_Timer = 17000;
|
||||
@@ -587,7 +587,7 @@ public:
|
||||
|
||||
if (DispelMagic_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = RAND(SelectGuestTarget(), SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)))
|
||||
if (Unit* pTarget = RAND(SelectGuestTarget(), SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)))
|
||||
DoCast(pTarget, SPELL_DISPELMAGIC);
|
||||
|
||||
DispelMagic_Timer = 25000;
|
||||
@@ -610,7 +610,7 @@ public:
|
||||
struct boss_lady_keira_berrybuckAI : public boss_moroes_guestAI
|
||||
{
|
||||
//Holy Pally
|
||||
boss_lady_keira_berrybuckAI(Creature *c) : boss_moroes_guestAI(c) {}
|
||||
boss_lady_keira_berrybuckAI(Creature* c) : boss_moroes_guestAI(c) {}
|
||||
|
||||
uint32 Cleanse_Timer;
|
||||
uint32 GreaterBless_Timer;
|
||||
@@ -644,7 +644,7 @@ public:
|
||||
|
||||
if (HolyLight_Timer <= diff)
|
||||
{
|
||||
Unit *pTarget = SelectGuestTarget();
|
||||
Unit* pTarget = SelectGuestTarget();
|
||||
|
||||
DoCast(pTarget, SPELL_HOLYLIGHT);
|
||||
HolyLight_Timer = 10000;
|
||||
@@ -652,7 +652,7 @@ public:
|
||||
|
||||
if (GreaterBless_Timer <= diff)
|
||||
{
|
||||
Unit *pTarget = SelectGuestTarget();
|
||||
Unit* pTarget = SelectGuestTarget();
|
||||
|
||||
DoCast(pTarget, SPELL_GREATERBLESSOFMIGHT);
|
||||
|
||||
@@ -661,7 +661,7 @@ public:
|
||||
|
||||
if (Cleanse_Timer <= diff)
|
||||
{
|
||||
Unit *pTarget = SelectGuestTarget();
|
||||
Unit* pTarget = SelectGuestTarget();
|
||||
|
||||
DoCast(pTarget, SPELL_CLEANSE);
|
||||
|
||||
@@ -685,7 +685,7 @@ public:
|
||||
struct boss_lord_robin_darisAI : public boss_moroes_guestAI
|
||||
{
|
||||
//Arms Warr
|
||||
boss_lord_robin_darisAI(Creature *c) : boss_moroes_guestAI(c) {}
|
||||
boss_lord_robin_darisAI(Creature* c) : boss_moroes_guestAI(c) {}
|
||||
|
||||
uint32 Hamstring_Timer;
|
||||
uint32 MortalStrike_Timer;
|
||||
@@ -742,7 +742,7 @@ public:
|
||||
struct boss_lord_crispin_ferenceAI : public boss_moroes_guestAI
|
||||
{
|
||||
//Arms Warr
|
||||
boss_lord_crispin_ferenceAI(Creature *c) : boss_moroes_guestAI(c) {}
|
||||
boss_lord_crispin_ferenceAI(Creature* c) : boss_moroes_guestAI(c) {}
|
||||
|
||||
uint32 Disarm_Timer;
|
||||
uint32 HeroicStrike_Timer;
|
||||
|
||||
@@ -63,7 +63,7 @@ class boss_netherspite : public CreatureScript
|
||||
public:
|
||||
boss_netherspite() : CreatureScript("boss_netherspite") { }
|
||||
|
||||
CreatureAI* GetAI(Creature *pCreature) const
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
{
|
||||
return new boss_netherspiteAI(pCreature);
|
||||
}
|
||||
@@ -141,7 +141,7 @@ public:
|
||||
pos[BLUE_PORTAL] = (r>1 ? 1: 2); // Blue Portal not on the left side (0)
|
||||
|
||||
for (int i=0; i<3; ++i)
|
||||
if (Creature *portal = me->SummonCreature(PortalID[i], PortalCoord[pos[i]][0], PortalCoord[pos[i]][1], PortalCoord[pos[i]][2], 0, TEMPSUMMON_TIMED_DESPAWN, 60000))
|
||||
if (Creature* portal = me->SummonCreature(PortalID[i], PortalCoord[pos[i]][0], PortalCoord[pos[i]][1], PortalCoord[pos[i]][2], 0, TEMPSUMMON_TIMED_DESPAWN, 60000))
|
||||
{
|
||||
PortalGUID[i] = portal->GetGUID();
|
||||
portal->AddAura(PortalVisual[i], portal);
|
||||
@@ -152,9 +152,9 @@ public:
|
||||
{
|
||||
for (int i=0; i<3; ++i)
|
||||
{
|
||||
if (Creature *portal = Unit::GetCreature(*me, PortalGUID[i]))
|
||||
if (Creature* portal = Unit::GetCreature(*me, PortalGUID[i]))
|
||||
portal->DisappearAndDie();
|
||||
if (Creature *portal = Unit::GetCreature(*me, BeamerGUID[i]))
|
||||
if (Creature* portal = Unit::GetCreature(*me, BeamerGUID[i]))
|
||||
portal->DisappearAndDie();
|
||||
PortalGUID[i] = 0;
|
||||
BeamTarget[i] = 0;
|
||||
@@ -164,12 +164,12 @@ public:
|
||||
void UpdatePortals() // Here we handle the beams' behavior
|
||||
{
|
||||
for (int j=0; j<3; ++j) // j = color
|
||||
if (Creature *portal = Unit::GetCreature(*me, PortalGUID[j]))
|
||||
if (Creature* portal = Unit::GetCreature(*me, PortalGUID[j]))
|
||||
{
|
||||
// the one who's been casted upon before
|
||||
Unit *current = Unit::GetUnit(*portal, BeamTarget[j]);
|
||||
Unit* current = Unit::GetUnit(*portal, BeamTarget[j]);
|
||||
// temporary store for the best suitable beam reciever
|
||||
Unit *pTarget = me;
|
||||
Unit* pTarget = me;
|
||||
|
||||
if (Map* map = me->GetMap())
|
||||
{
|
||||
@@ -199,14 +199,14 @@ public:
|
||||
{
|
||||
BeamTarget[j] = pTarget->GetGUID();
|
||||
// remove currently beaming portal
|
||||
if (Creature *beamer = Unit::GetCreature(*portal, BeamerGUID[j]))
|
||||
if (Creature* beamer = Unit::GetCreature(*portal, BeamerGUID[j]))
|
||||
{
|
||||
beamer->CastSpell(pTarget, PortalBeam[j], false);
|
||||
beamer->DisappearAndDie();
|
||||
BeamerGUID[j] = 0;
|
||||
}
|
||||
// create new one and start beaming on the target
|
||||
if (Creature *beamer = portal->SummonCreature(PortalID[j], portal->GetPositionX(), portal->GetPositionY(), portal->GetPositionZ(), portal->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN, 60000))
|
||||
if (Creature* beamer = portal->SummonCreature(PortalID[j], portal->GetPositionX(), portal->GetPositionY(), portal->GetPositionZ(), portal->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN, 60000))
|
||||
{
|
||||
beamer->CastSpell(pTarget, PortalBeam[j], false);
|
||||
BeamerGUID[j] = beamer->GetGUID();
|
||||
@@ -247,7 +247,7 @@ public:
|
||||
|
||||
void HandleDoors(bool open) // Massive Door switcher
|
||||
{
|
||||
if (GameObject *Door = GameObject::GetGameObject(*me, pInstance ? pInstance->GetData64(DATA_GO_MASSIVE_DOOR) : 0))
|
||||
if (GameObject* Door = GameObject::GetGameObject(*me, pInstance ? pInstance->GetData64(DATA_GO_MASSIVE_DOOR) : 0))
|
||||
Door->SetGoState(open ? GO_STATE_ACTIVE : GO_STATE_READY);
|
||||
}
|
||||
|
||||
@@ -314,7 +314,7 @@ public:
|
||||
// Netherbreath
|
||||
if (NetherbreathTimer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 40, true))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 40, true))
|
||||
DoCast(pTarget, SPELL_NETHERBREATH);
|
||||
NetherbreathTimer = urand(5000, 7000);
|
||||
} else NetherbreathTimer -= diff;
|
||||
|
||||
@@ -177,7 +177,7 @@ public:
|
||||
HandleTerraceDoors(true);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (!Intro && !Flying)
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
@@ -229,7 +229,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void JustSummoned(Creature *summoned)
|
||||
void JustSummoned(Creature* summoned)
|
||||
{
|
||||
summoned->AI()->AttackStart(me->getVictim());
|
||||
}
|
||||
@@ -321,14 +321,14 @@ public:
|
||||
|
||||
if (CharredEarthTimer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(pTarget, SPELL_CHARRED_EARTH);
|
||||
CharredEarthTimer = 20000;
|
||||
} else CharredEarthTimer -= diff;
|
||||
|
||||
if (TailSweepTimer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (!me->HasInArc(M_PI, pTarget))
|
||||
DoCast(pTarget, SPELL_TAIL_SWEEP);
|
||||
TailSweepTimer = 15000;
|
||||
@@ -336,7 +336,7 @@ public:
|
||||
|
||||
if (SearingCindersTimer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(pTarget, SPELL_SEARING_CINDERS);
|
||||
SearingCindersTimer = 10000;
|
||||
} else SearingCindersTimer -= diff;
|
||||
@@ -378,7 +378,7 @@ public:
|
||||
|
||||
if (DistractingAshTimer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(pTarget, SPELL_DISTRACTING_ASH);
|
||||
DistractingAshTimer = 2000; //timer wrong
|
||||
} else DistractingAshTimer -= diff;
|
||||
@@ -395,7 +395,7 @@ public:
|
||||
|
||||
if (FireballBarrageTimer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_FARTHEST, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_FARTHEST, 0))
|
||||
DoCast(pTarget, SPELL_FIREBALL_BARRAGE);
|
||||
FireballBarrageTimer = 20000;
|
||||
} else FireballBarrageTimer -= diff;
|
||||
|
||||
@@ -108,7 +108,7 @@ public:
|
||||
|
||||
struct netherspite_infernalAI : public ScriptedAI
|
||||
{
|
||||
netherspite_infernalAI(Creature *c) : ScriptedAI(c) ,
|
||||
netherspite_infernalAI(Creature* c) : ScriptedAI(c) ,
|
||||
HellfireTimer(0), CleanupTimer(0), malchezaar(0), point(NULL) {}
|
||||
|
||||
uint32 HellfireTimer;
|
||||
@@ -142,9 +142,9 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void KilledUnit(Unit *who)
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
Unit *pMalchezaar = Unit::GetUnit(*me, malchezaar);
|
||||
Unit* pMalchezaar = Unit::GetUnit(*me, malchezaar);
|
||||
if (pMalchezaar)
|
||||
CAST_CRE(pMalchezaar)->AI()->KilledUnit(who);
|
||||
}
|
||||
@@ -160,7 +160,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void DamageTaken(Unit *done_by, uint32 &damage)
|
||||
void DamageTaken(Unit* done_by, uint32 &damage)
|
||||
{
|
||||
if (done_by->GetGUID() != malchezaar)
|
||||
damage = 0;
|
||||
@@ -183,7 +183,7 @@ public:
|
||||
|
||||
struct boss_malchezaarAI : public ScriptedAI
|
||||
{
|
||||
boss_malchezaarAI(Creature *c) : ScriptedAI(c)
|
||||
boss_malchezaarAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -271,7 +271,7 @@ public:
|
||||
{
|
||||
//Infernal Cleanup
|
||||
for (std::vector<uint64>::const_iterator itr = infernals.begin(); itr != infernals.end(); ++itr)
|
||||
if (Unit *pInfernal = Unit::GetUnit(*me, *itr))
|
||||
if (Unit* pInfernal = Unit::GetUnit(*me, *itr))
|
||||
if (pInfernal->isAlive())
|
||||
{
|
||||
pInfernal->SetVisible(false);
|
||||
@@ -285,7 +285,7 @@ public:
|
||||
{
|
||||
for (uint8 i = 0; i < 2; ++i)
|
||||
{
|
||||
Unit *axe = Unit::GetUnit(*me, axes[i]);
|
||||
Unit* axe = Unit::GetUnit(*me, axes[i]);
|
||||
if (axe && axe->isAlive())
|
||||
axe->Kill(axe);
|
||||
axes[i] = 0;
|
||||
@@ -310,7 +310,7 @@ public:
|
||||
return;
|
||||
|
||||
std::list<HostileReference *> t_list = me->getThreatManager().getThreatList();
|
||||
std::vector<Unit *> targets;
|
||||
std::vector<Unit* > targets;
|
||||
|
||||
if (!t_list.size())
|
||||
return;
|
||||
@@ -319,7 +319,7 @@ public:
|
||||
std::list<HostileReference *>::const_iterator itr = t_list.begin();
|
||||
std::advance(itr, 1);
|
||||
for (; itr != t_list.end(); ++itr) //store the threat list in a different container
|
||||
if (Unit *pTarget = Unit::GetUnit(*me, (*itr)->getUnitGuid()))
|
||||
if (Unit* pTarget = Unit::GetUnit(*me, (*itr)->getUnitGuid()))
|
||||
if (pTarget->isAlive() && pTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
targets.push_back(pTarget);
|
||||
|
||||
@@ -328,8 +328,8 @@ public:
|
||||
targets.erase(targets.begin()+rand()%targets.size());
|
||||
|
||||
uint32 i = 0;
|
||||
for (std::vector<Unit *>::const_iterator iter = targets.begin(); iter != targets.end(); ++iter, ++i)
|
||||
if (Unit *pTarget = *iter)
|
||||
for (std::vector<Unit* >::const_iterator iter = targets.begin(); iter != targets.end(); ++iter, ++i)
|
||||
if (Unit* pTarget = *iter)
|
||||
{
|
||||
enfeeble_targets[i] = pTarget->GetGUID();
|
||||
enfeeble_health[i] = pTarget->GetHealth();
|
||||
@@ -343,7 +343,7 @@ public:
|
||||
{
|
||||
for (uint8 i = 0; i < 5; ++i)
|
||||
{
|
||||
Unit *pTarget = Unit::GetUnit(*me, enfeeble_targets[i]);
|
||||
Unit* pTarget = Unit::GetUnit(*me, enfeeble_targets[i]);
|
||||
if (pTarget && pTarget->isAlive())
|
||||
pTarget->SetHealth(enfeeble_health[i]);
|
||||
enfeeble_targets[i] = 0;
|
||||
@@ -365,7 +365,7 @@ public:
|
||||
pos.Relocate(point->x, point->y, INFERNAL_Z);
|
||||
}
|
||||
|
||||
Creature *Infernal = me->SummonCreature(NETHERSPITE_INFERNAL, pos, TEMPSUMMON_TIMED_DESPAWN, 180000);
|
||||
Creature* Infernal = me->SummonCreature(NETHERSPITE_INFERNAL, pos, TEMPSUMMON_TIMED_DESPAWN, 180000);
|
||||
|
||||
if (Infernal)
|
||||
{
|
||||
@@ -449,10 +449,10 @@ public:
|
||||
|
||||
DoScriptText(SAY_AXE_TOSS2, me);
|
||||
|
||||
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
|
||||
for (uint8 i = 0; i < 2; ++i)
|
||||
{
|
||||
Creature *axe = me->SummonCreature(MALCHEZARS_AXE, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
|
||||
Creature* axe = me->SummonCreature(MALCHEZARS_AXE, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
|
||||
if (axe)
|
||||
{
|
||||
axe->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
@@ -494,11 +494,11 @@ public:
|
||||
{
|
||||
AxesTargetSwitchTimer = urand(7500, 20000);
|
||||
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
{
|
||||
for (uint8 i = 0; i < 2; ++i)
|
||||
{
|
||||
if (Unit *axe = Unit::GetUnit(*me, axes[i]))
|
||||
if (Unit* axe = Unit::GetUnit(*me, axes[i]))
|
||||
{
|
||||
if (axe->getVictim())
|
||||
DoModifyThreatPercent(axe->getVictim(), -100);
|
||||
@@ -513,7 +513,7 @@ public:
|
||||
|
||||
if (AmplifyDamageTimer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(pTarget, SPELL_AMPLIFY_DAMAGE);
|
||||
AmplifyDamageTimer = urand(20000, 30000);
|
||||
} else AmplifyDamageTimer -= diff;
|
||||
@@ -536,7 +536,7 @@ public:
|
||||
{
|
||||
if (SWPainTimer <= diff)
|
||||
{
|
||||
Unit *pTarget = NULL;
|
||||
Unit* pTarget = NULL;
|
||||
if (phase == 1)
|
||||
pTarget = me->getVictim(); // the tank
|
||||
else // anyone but the tank
|
||||
@@ -585,7 +585,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void Cleanup(Creature *infernal, InfernalPoint *point)
|
||||
void Cleanup(Creature* infernal, InfernalPoint *point)
|
||||
{
|
||||
for (std::vector<uint64>::iterator itr = infernals.begin(); itr!= infernals.end(); ++itr)
|
||||
if (*itr == infernal->GetGUID())
|
||||
@@ -602,7 +602,7 @@ public:
|
||||
|
||||
void netherspite_infernal::netherspite_infernalAI::Cleanup()
|
||||
{
|
||||
Unit *pMalchezaar = Unit::GetUnit(*me, malchezaar);
|
||||
Unit* pMalchezaar = Unit::GetUnit(*me, malchezaar);
|
||||
|
||||
if (pMalchezaar && pMalchezaar->isAlive())
|
||||
CAST_AI(boss_malchezaar::boss_malchezaarAI, CAST_CRE(pMalchezaar)->AI())->Cleanup(me, point);
|
||||
|
||||
@@ -93,7 +93,7 @@ public:
|
||||
|
||||
struct boss_aranAI : public ScriptedAI
|
||||
{
|
||||
boss_aranAI(Creature *c) : ScriptedAI(c)
|
||||
boss_aranAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -195,7 +195,7 @@ public:
|
||||
//store the threat list in a different container
|
||||
for (std::list<HostileReference *>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
|
||||
{
|
||||
Unit *pTarget = Unit::GetUnit(*me, (*itr)->getUnitGuid());
|
||||
Unit* pTarget = Unit::GetUnit(*me, (*itr)->getUnitGuid());
|
||||
//only on alive players
|
||||
if (pTarget && pTarget->isAlive() && pTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
targets.push_back(pTarget);
|
||||
@@ -309,7 +309,7 @@ public:
|
||||
{
|
||||
if (!me->IsNonMeleeSpellCasted(false))
|
||||
{
|
||||
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
|
||||
if (!pTarget)
|
||||
return;
|
||||
|
||||
@@ -523,7 +523,7 @@ public:
|
||||
|
||||
struct water_elementalAI : public ScriptedAI
|
||||
{
|
||||
water_elementalAI(Creature *c) : ScriptedAI(c) {}
|
||||
water_elementalAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 CastTimer;
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
|
||||
struct mob_kilrekAI : public ScriptedAI
|
||||
{
|
||||
mob_kilrekAI(Creature *c) : ScriptedAI(c)
|
||||
mob_kilrekAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -140,7 +140,7 @@ public:
|
||||
|
||||
struct mob_demon_chainAI : public ScriptedAI
|
||||
{
|
||||
mob_demon_chainAI(Creature *c) : ScriptedAI(c) {}
|
||||
mob_demon_chainAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint64 SacrificeGUID;
|
||||
|
||||
@@ -178,7 +178,7 @@ public:
|
||||
|
||||
struct mob_fiendish_portalAI : public PassiveAI
|
||||
{
|
||||
mob_fiendish_portalAI(Creature *c) : PassiveAI(c), summons(me){}
|
||||
mob_fiendish_portalAI(Creature* c) : PassiveAI(c), summons(me){}
|
||||
|
||||
SummonList summons;
|
||||
|
||||
@@ -215,7 +215,7 @@ public:
|
||||
|
||||
struct mob_fiendish_impAI : public ScriptedAI
|
||||
{
|
||||
mob_fiendish_impAI(Creature *c) : ScriptedAI(c) {}
|
||||
mob_fiendish_impAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 FireboltTimer;
|
||||
|
||||
@@ -258,7 +258,7 @@ public:
|
||||
|
||||
struct boss_terestianAI : public ScriptedAI
|
||||
{
|
||||
boss_terestianAI(Creature *c) : ScriptedAI(c)
|
||||
boss_terestianAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
for (uint8 i = 0; i < 2; ++i)
|
||||
PortalGUID[i] = 0;
|
||||
@@ -370,7 +370,7 @@ public:
|
||||
|
||||
if (SacrificeTimer <= diff)
|
||||
{
|
||||
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true);
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true);
|
||||
if (pTarget && pTarget->isAlive())
|
||||
{
|
||||
DoCast(pTarget, SPELL_SACRIFICE, true);
|
||||
|
||||
@@ -388,7 +388,7 @@ public:
|
||||
|
||||
if (BrainWipeTimer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(pTarget, SPELL_BRAIN_WIPE);
|
||||
BrainWipeTimer = 20000;
|
||||
} else BrainWipeTimer -= diff;
|
||||
@@ -869,7 +869,7 @@ public:
|
||||
{
|
||||
if (!IsChasing)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
{
|
||||
DoScriptText(SAY_WOLF_HOOD, me);
|
||||
DoCast(pTarget, SPELL_LITTLE_RED_RIDING_HOOD, true);
|
||||
@@ -886,7 +886,7 @@ public:
|
||||
{
|
||||
IsChasing = false;
|
||||
|
||||
if (Unit *pTarget = Unit::GetUnit((*me), HoodGUID))
|
||||
if (Unit* pTarget = Unit::GetUnit((*me), HoodGUID))
|
||||
{
|
||||
HoodGUID = 0;
|
||||
if (DoGetThreat(pTarget))
|
||||
@@ -977,7 +977,7 @@ void PretendToDie(Creature* pCreature)
|
||||
pCreature->SetStandState(UNIT_STAND_STATE_DEAD);
|
||||
};
|
||||
|
||||
void Resurrect(Creature *pTarget)
|
||||
void Resurrect(Creature* pTarget)
|
||||
{
|
||||
pTarget->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
pTarget->SetFullHealth();
|
||||
@@ -1289,7 +1289,7 @@ public:
|
||||
|
||||
if (BackwardLungeTimer <= diff)
|
||||
{
|
||||
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true);
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true);
|
||||
if (pTarget && !me->HasInArc(M_PI, pTarget))
|
||||
{
|
||||
DoCast(pTarget, SPELL_BACKWARD_LUNGE);
|
||||
@@ -1305,7 +1305,7 @@ public:
|
||||
|
||||
if (DeadlySwatheTimer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(pTarget, SPELL_DEADLY_SWATHE);
|
||||
DeadlySwatheTimer = urand(15000, 25000);
|
||||
} else DeadlySwatheTimer -= diff;
|
||||
@@ -1410,7 +1410,7 @@ void boss_julianne::boss_julianneAI::UpdateAI(const uint32 diff)
|
||||
|
||||
if (BlindingPassionTimer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(pTarget, SPELL_BLINDING_PASSION);
|
||||
BlindingPassionTimer = urand(30000, 45000);
|
||||
} else BlindingPassionTimer -= diff;
|
||||
|
||||
@@ -173,7 +173,7 @@ public:
|
||||
//Close the encounter door, open it in JustDied/Reset
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (!HasTaunted && me->IsWithinDistInMap(who, 40.0f))
|
||||
{
|
||||
@@ -302,7 +302,7 @@ public:
|
||||
if (PhoenixTimer <= diff)
|
||||
{
|
||||
|
||||
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1);
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1);
|
||||
|
||||
uint8 random = urand(1, 2);
|
||||
float x = KaelLocations[random][0];
|
||||
@@ -323,7 +323,7 @@ public:
|
||||
|
||||
if (FlameStrikeTimer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
{
|
||||
me->InterruptSpell(CURRENT_CHANNELED_SPELL);
|
||||
me->InterruptSpell(CURRENT_GENERIC_SPELL);
|
||||
@@ -395,7 +395,7 @@ public:
|
||||
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
{
|
||||
Unit *pTarget = NULL;
|
||||
Unit* pTarget = NULL;
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
|
||||
Creature* Orb = DoSpawnCreature(CREATURE_ARCANE_SPHERE, 5, 5, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000);
|
||||
@@ -441,7 +441,7 @@ public:
|
||||
|
||||
struct mob_felkael_flamestrikeAI : public ScriptedAI
|
||||
{
|
||||
mob_felkael_flamestrikeAI(Creature *c) : ScriptedAI(c)
|
||||
mob_felkael_flamestrikeAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -603,7 +603,7 @@ public:
|
||||
|
||||
struct mob_felkael_phoenix_eggAI : public ScriptedAI
|
||||
{
|
||||
mob_felkael_phoenix_eggAI(Creature *c) : ScriptedAI(c) {}
|
||||
mob_felkael_phoenix_eggAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 HatchTimer;
|
||||
|
||||
@@ -640,7 +640,7 @@ public:
|
||||
|
||||
struct mob_arcane_sphereAI : public ScriptedAI
|
||||
{
|
||||
mob_arcane_sphereAI(Creature *c) : ScriptedAI(c) { Reset(); }
|
||||
mob_arcane_sphereAI(Creature* c) : ScriptedAI(c) { Reset(); }
|
||||
|
||||
uint32 DespawnTimer;
|
||||
uint32 ChangeTargetTimer;
|
||||
@@ -671,7 +671,7 @@ public:
|
||||
|
||||
if (ChangeTargetTimer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
{
|
||||
me->AddThreat(pTarget, 1.0f);
|
||||
me->TauntApply(pTarget);
|
||||
|
||||
@@ -256,7 +256,7 @@ public:
|
||||
if (HealTimer <= diff)
|
||||
{
|
||||
uint32 health = me->GetHealth();
|
||||
Unit *pTarget = me;
|
||||
Unit* pTarget = me;
|
||||
for (uint8 i = 0; i < MAX_ACTIVE_LACKEY; ++i)
|
||||
{
|
||||
if (Unit* pAdd = Unit::GetUnit(*me, m_auiLackeyGUID[i]))
|
||||
@@ -272,7 +272,7 @@ public:
|
||||
|
||||
if (RenewTimer <= diff)
|
||||
{
|
||||
Unit *pTarget = me;
|
||||
Unit* pTarget = me;
|
||||
|
||||
if (urand(0, 1))
|
||||
if (Unit* pAdd = Unit::GetUnit(*me, m_auiLackeyGUID[rand()%MAX_ACTIVE_LACKEY]))
|
||||
@@ -285,7 +285,7 @@ public:
|
||||
|
||||
if (ShieldTimer <= diff)
|
||||
{
|
||||
Unit *pTarget = me;
|
||||
Unit* pTarget = me;
|
||||
|
||||
if (urand(0, 1))
|
||||
if (Unit* pAdd = Unit::GetUnit(*me, m_auiLackeyGUID[rand()%MAX_ACTIVE_LACKEY]))
|
||||
@@ -298,7 +298,7 @@ public:
|
||||
|
||||
if (DispelTimer <= diff)
|
||||
{
|
||||
Unit *pTarget = NULL;
|
||||
Unit* pTarget = NULL;
|
||||
|
||||
if (urand(0, 1))
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
|
||||
@@ -494,7 +494,7 @@ public:
|
||||
struct boss_kagani_nightstrikeAI : public boss_priestess_lackey_commonAI
|
||||
{
|
||||
//Rogue
|
||||
boss_kagani_nightstrikeAI(Creature *c) : boss_priestess_lackey_commonAI(c) {}
|
||||
boss_kagani_nightstrikeAI(Creature* c) : boss_priestess_lackey_commonAI(c) {}
|
||||
|
||||
uint32 Gouge_Timer;
|
||||
uint32 Kick_Timer;
|
||||
@@ -599,7 +599,7 @@ public:
|
||||
struct boss_ellris_duskhallowAI : public boss_priestess_lackey_commonAI
|
||||
{
|
||||
//Warlock
|
||||
boss_ellris_duskhallowAI(Creature *c) : boss_priestess_lackey_commonAI(c) {}
|
||||
boss_ellris_duskhallowAI(Creature* c) : boss_priestess_lackey_commonAI(c) {}
|
||||
|
||||
uint32 Immolate_Timer;
|
||||
uint32 Shadow_Bolt_Timer;
|
||||
@@ -691,7 +691,7 @@ public:
|
||||
struct boss_eramas_brightblazeAI : public boss_priestess_lackey_commonAI
|
||||
{
|
||||
//Monk
|
||||
boss_eramas_brightblazeAI(Creature *c) : boss_priestess_lackey_commonAI(c) {}
|
||||
boss_eramas_brightblazeAI(Creature* c) : boss_priestess_lackey_commonAI(c) {}
|
||||
|
||||
uint32 Knockdown_Timer;
|
||||
uint32 Snap_Kick_Timer;
|
||||
@@ -753,7 +753,7 @@ public:
|
||||
struct boss_yazzaiAI : public boss_priestess_lackey_commonAI
|
||||
{
|
||||
//Mage
|
||||
boss_yazzaiAI(Creature *c) : boss_priestess_lackey_commonAI(c) {}
|
||||
boss_yazzaiAI(Creature* c) : boss_priestess_lackey_commonAI(c) {}
|
||||
|
||||
bool HasIceBlocked;
|
||||
|
||||
@@ -791,7 +791,7 @@ public:
|
||||
|
||||
if (Polymorph_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
DoCast(pTarget, SPELL_POLYMORPH);
|
||||
Polymorph_Timer = 20000;
|
||||
@@ -836,7 +836,7 @@ public:
|
||||
std::list<HostileReference*>& t_list = me->getThreatManager().getThreatList();
|
||||
for (std::list<HostileReference*>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
|
||||
{
|
||||
if (Unit *pTarget = Unit::GetUnit(*me, (*itr)->getUnitGuid()))
|
||||
if (Unit* pTarget = Unit::GetUnit(*me, (*itr)->getUnitGuid()))
|
||||
{
|
||||
//if in melee range
|
||||
if (pTarget->IsWithinDistInMap(me, 5))
|
||||
@@ -884,7 +884,7 @@ public:
|
||||
struct boss_warlord_salarisAI : public boss_priestess_lackey_commonAI
|
||||
{
|
||||
//Warrior
|
||||
boss_warlord_salarisAI(Creature *c) : boss_priestess_lackey_commonAI(c) {}
|
||||
boss_warlord_salarisAI(Creature* c) : boss_priestess_lackey_commonAI(c) {}
|
||||
|
||||
uint32 Intercept_Stun_Timer;
|
||||
uint32 Disarm_Timer;
|
||||
@@ -923,7 +923,7 @@ public:
|
||||
std::list<HostileReference*>& t_list = me->getThreatManager().getThreatList();
|
||||
for (std::list<HostileReference*>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
|
||||
{
|
||||
if (Unit *pTarget = Unit::GetUnit(*me, (*itr)->getUnitGuid()))
|
||||
if (Unit* pTarget = Unit::GetUnit(*me, (*itr)->getUnitGuid()))
|
||||
{
|
||||
//if in melee range
|
||||
if (pTarget->IsWithinDistInMap(me, ATTACK_DISTANCE))
|
||||
@@ -1005,7 +1005,7 @@ public:
|
||||
struct boss_garaxxasAI : public boss_priestess_lackey_commonAI
|
||||
{
|
||||
//Hunter
|
||||
boss_garaxxasAI(Creature *c) : boss_priestess_lackey_commonAI(c) { m_uiPetGUID = 0; }
|
||||
boss_garaxxasAI(Creature* c) : boss_priestess_lackey_commonAI(c) { m_uiPetGUID = 0; }
|
||||
|
||||
uint64 m_uiPetGUID;
|
||||
|
||||
@@ -1125,7 +1125,7 @@ public:
|
||||
struct boss_apokoAI : public boss_priestess_lackey_commonAI
|
||||
{
|
||||
//Shaman
|
||||
boss_apokoAI(Creature *c) : boss_priestess_lackey_commonAI(c) {}
|
||||
boss_apokoAI(Creature* c) : boss_priestess_lackey_commonAI(c) {}
|
||||
|
||||
uint32 Totem_Timer;
|
||||
uint8 Totem_Amount;
|
||||
@@ -1224,7 +1224,7 @@ public:
|
||||
struct boss_zelfanAI : public boss_priestess_lackey_commonAI
|
||||
{
|
||||
//Engineer
|
||||
boss_zelfanAI(Creature *c) : boss_priestess_lackey_commonAI(c) {}
|
||||
boss_zelfanAI(Creature* c) : boss_priestess_lackey_commonAI(c) {}
|
||||
|
||||
uint32 Goblin_Dragon_Gun_Timer;
|
||||
uint32 Rocket_Launch_Timer;
|
||||
|
||||
@@ -333,7 +333,7 @@ public:
|
||||
|
||||
struct mob_fel_crystalAI : public ScriptedAI
|
||||
{
|
||||
mob_fel_crystalAI(Creature *c) : ScriptedAI(c) {}
|
||||
mob_fel_crystalAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
void Reset() {}
|
||||
void EnterCombat(Unit* /*who*/) {}
|
||||
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
|
||||
struct boss_vexallusAI : public ScriptedAI
|
||||
{
|
||||
boss_vexallusAI(Creature *c) : ScriptedAI(c)
|
||||
boss_vexallusAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -115,9 +115,9 @@ public:
|
||||
pInstance->SetData(DATA_VEXALLUS_EVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature *summoned)
|
||||
void JustSummoned(Creature* summoned)
|
||||
{
|
||||
if (Unit *temp = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* temp = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
summoned->GetMotionMaster()->MoveFollow(temp, 0, 0);
|
||||
|
||||
//spells are SUMMON_TYPE_GUARDIAN, so using setOwner should be ok
|
||||
@@ -163,7 +163,7 @@ public:
|
||||
|
||||
if (ChainLightningTimer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_CHAIN_LIGHTNING);
|
||||
|
||||
ChainLightningTimer = 8000;
|
||||
@@ -171,7 +171,7 @@ public:
|
||||
|
||||
if (ArcaneShockTimer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (pTarget)
|
||||
DoCast(pTarget, SPELL_ARCANE_SHOCK);
|
||||
|
||||
@@ -206,13 +206,13 @@ public:
|
||||
|
||||
struct mob_pure_energyAI : public ScriptedAI
|
||||
{
|
||||
mob_pure_energyAI(Creature *c) : ScriptedAI(c) {}
|
||||
mob_pure_energyAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
void Reset() {}
|
||||
|
||||
void JustDied(Unit* slayer)
|
||||
{
|
||||
if (Unit *temp = me->GetOwner())
|
||||
if (Unit* temp = me->GetOwner())
|
||||
{
|
||||
if (temp && temp->isAlive())
|
||||
slayer->CastSpell(slayer, SPELL_ENERGY_FEEDBACK, true, 0, 0, temp->GetGUID());
|
||||
|
||||
@@ -52,7 +52,7 @@ class boss_baron_geddon : public CreatureScript
|
||||
|
||||
struct boss_baron_geddonAI : public BossAI
|
||||
{
|
||||
boss_baron_geddonAI(Creature *pCreature) : BossAI(pCreature, BOSS_BARON_GEDDON)
|
||||
boss_baron_geddonAI(Creature* pCreature) : BossAI(pCreature, BOSS_BARON_GEDDON)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ class boss_magmadar : public CreatureScript
|
||||
|
||||
struct boss_magmadarAI : public BossAI
|
||||
{
|
||||
boss_magmadarAI(Creature *pCreature) : BossAI(pCreature, BOSS_MAGMADAR)
|
||||
boss_magmadarAI(Creature* pCreature) : BossAI(pCreature, BOSS_MAGMADAR)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ class boss_majordomo : public CreatureScript
|
||||
|
||||
struct boss_majordomoAI : public BossAI
|
||||
{
|
||||
boss_majordomoAI(Creature *pCreature) : BossAI(pCreature, BOSS_MAJORDOMO_EXECUTUS)
|
||||
boss_majordomoAI(Creature* pCreature) : BossAI(pCreature, BOSS_MAJORDOMO_EXECUTUS)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ class boss_ragnaros : public CreatureScript
|
||||
|
||||
struct boss_ragnarosAI : public BossAI
|
||||
{
|
||||
boss_ragnarosAI(Creature *pCreature) : BossAI(pCreature, BOSS_RAGNAROS)
|
||||
boss_ragnarosAI(Creature* pCreature) : BossAI(pCreature, BOSS_RAGNAROS)
|
||||
{
|
||||
_introState = 0;
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
@@ -316,7 +316,7 @@ class mob_son_of_flame : public CreatureScript
|
||||
|
||||
struct mob_son_of_flameAI : public ScriptedAI //didnt work correctly in EAI for me...
|
||||
{
|
||||
mob_son_of_flameAI(Creature *c) : ScriptedAI(c)
|
||||
mob_son_of_flameAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
instance = me->GetInstanceScript();
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ public:
|
||||
|
||||
struct npc_unworthy_initiateAI : public ScriptedAI
|
||||
{
|
||||
npc_unworthy_initiateAI(Creature *c) : ScriptedAI(c)
|
||||
npc_unworthy_initiateAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
if (!me->GetEquipmentId())
|
||||
@@ -155,7 +155,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void EventStart(Creature* anchor, Player *pTarget)
|
||||
void EventStart(Creature* anchor, Player* pTarget)
|
||||
{
|
||||
wait_timer = 5000;
|
||||
phase = PHASE_TO_EQUIP;
|
||||
@@ -178,7 +178,7 @@ public:
|
||||
case PHASE_CHAINED:
|
||||
if (!anchorGUID)
|
||||
{
|
||||
if (Creature *anchor = me->FindNearestCreature(29521, 30))
|
||||
if (Creature* anchor = me->FindNearestCreature(29521, 30))
|
||||
{
|
||||
anchor->AI()->SetGUID(me->GetGUID());
|
||||
anchor->CastSpell(me, SPELL_SOUL_PRISON_CHAIN, true);
|
||||
@@ -188,7 +188,7 @@ public:
|
||||
sLog->outError("npc_unworthy_initiateAI: unable to find anchor!");
|
||||
|
||||
float dist = 99.0f;
|
||||
GameObject *prison = NULL;
|
||||
GameObject* prison = NULL;
|
||||
|
||||
for (uint8 i = 0; i < 12; ++i)
|
||||
{
|
||||
@@ -233,7 +233,7 @@ public:
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
|
||||
phase = PHASE_ATTACKING;
|
||||
|
||||
if (Player *pTarget = Unit::GetPlayer(*me, playerGUID))
|
||||
if (Player* pTarget = Unit::GetPlayer(*me, playerGUID))
|
||||
me->AI()->AttackStart(pTarget);
|
||||
wait_timer = 0;
|
||||
}
|
||||
@@ -293,7 +293,7 @@ public:
|
||||
|
||||
struct npc_unworthy_initiate_anchorAI : public PassiveAI
|
||||
{
|
||||
npc_unworthy_initiate_anchorAI(Creature *c) : PassiveAI(c), prisonerGUID(0) {}
|
||||
npc_unworthy_initiate_anchorAI(Creature* c) : PassiveAI(c), prisonerGUID(0) {}
|
||||
|
||||
uint64 prisonerGUID;
|
||||
|
||||
@@ -315,7 +315,7 @@ public:
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* pGo)
|
||||
{
|
||||
if (Creature *anchor = pGo->FindNearestCreature(29521, 15))
|
||||
if (Creature* anchor = pGo->FindNearestCreature(29521, 15))
|
||||
if (uint64 prisonerGUID = anchor->AI()->GetGUID())
|
||||
if (Creature* prisoner = Creature::GetCreature(*pPlayer, prisonerGUID))
|
||||
CAST_AI(npc_unworthy_initiate::npc_unworthy_initiateAI, prisoner->AI())->EventStart(anchor, pPlayer);
|
||||
@@ -531,7 +531,7 @@ public:
|
||||
|
||||
struct npc_dark_rider_of_acherusAI : public ScriptedAI
|
||||
{
|
||||
npc_dark_rider_of_acherusAI(Creature *c) : ScriptedAI(c) {}
|
||||
npc_dark_rider_of_acherusAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 PhaseTimer;
|
||||
uint32 Phase;
|
||||
@@ -561,7 +561,7 @@ public:
|
||||
Phase = 1;
|
||||
break;
|
||||
case 1:
|
||||
if (Unit *pTarget = Unit::GetUnit(*me, TargetGUID))
|
||||
if (Unit* pTarget = Unit::GetUnit(*me, TargetGUID))
|
||||
DoCast(pTarget, DESPAWN_HORSE, true);
|
||||
PhaseTimer = 3000;
|
||||
Phase = 2;
|
||||
@@ -581,7 +581,7 @@ public:
|
||||
|
||||
}
|
||||
|
||||
void InitDespawnHorse(Unit *who)
|
||||
void InitDespawnHorse(Unit* who)
|
||||
{
|
||||
if (!who)
|
||||
return;
|
||||
@@ -623,15 +623,15 @@ public:
|
||||
|
||||
struct npc_salanar_the_horsemanAI : public ScriptedAI
|
||||
{
|
||||
npc_salanar_the_horsemanAI(Creature *c) : ScriptedAI(c) {}
|
||||
npc_salanar_the_horsemanAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
void SpellHit(Unit *caster, const SpellEntry *spell)
|
||||
void SpellHit(Unit* caster, const SpellEntry *spell)
|
||||
{
|
||||
if (spell->Id == DELIVER_STOLEN_HORSE)
|
||||
{
|
||||
if (caster->GetTypeId() == TYPEID_UNIT && caster->IsVehicle())
|
||||
{
|
||||
if (Unit *charmer = caster->GetCharmer())
|
||||
if (Unit* charmer = caster->GetCharmer())
|
||||
{
|
||||
if (charmer->HasAura(EFFECT_STOLEN_HORSE))
|
||||
{
|
||||
@@ -647,13 +647,13 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
|
||||
if (who->GetTypeId() == TYPEID_UNIT && who->IsVehicle() && me->IsWithinDistInMap(who, 5.0f))
|
||||
{
|
||||
if (Unit *charmer = who->GetCharmer())
|
||||
if (Unit* charmer = who->GetCharmer())
|
||||
{
|
||||
if (charmer->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
@@ -692,7 +692,7 @@ public:
|
||||
|
||||
struct npc_ros_dark_riderAI : public ScriptedAI
|
||||
{
|
||||
npc_ros_dark_riderAI(Creature *c) : ScriptedAI(c) {}
|
||||
npc_ros_dark_riderAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
@@ -743,15 +743,15 @@ public:
|
||||
|
||||
struct npc_dkc1_gothikAI : public ScriptedAI
|
||||
{
|
||||
npc_dkc1_gothikAI(Creature *c) : ScriptedAI(c) {}
|
||||
npc_dkc1_gothikAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
|
||||
if (who->GetEntry() == GHOULS && me->IsWithinDistInMap(who, 10.0f))
|
||||
{
|
||||
if (Unit *owner = who->GetOwner())
|
||||
if (Unit* owner = who->GetOwner())
|
||||
{
|
||||
if (owner->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
@@ -785,7 +785,7 @@ public:
|
||||
|
||||
struct npc_scarlet_ghoulAI : public ScriptedAI
|
||||
{
|
||||
npc_scarlet_ghoulAI(Creature *c) : ScriptedAI(c)
|
||||
npc_scarlet_ghoulAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
// Ghouls should display their Birth Animation
|
||||
// Crawling out of the ground
|
||||
@@ -794,7 +794,7 @@ public:
|
||||
me->SetReactState(REACT_DEFENSIVE);
|
||||
}
|
||||
|
||||
void FindMinions(Unit *owner)
|
||||
void FindMinions(Unit* owner)
|
||||
{
|
||||
std::list<Creature*> MinionList;
|
||||
owner->GetAllMinionsByEntry(MinionList, GHOULS);
|
||||
@@ -818,7 +818,7 @@ public:
|
||||
{
|
||||
if (!me->isInCombat())
|
||||
{
|
||||
if (Unit *owner = me->GetOwner())
|
||||
if (Unit* owner = me->GetOwner())
|
||||
{
|
||||
if (owner->GetTypeId() == TYPEID_PLAYER && CAST_PLR(owner)->isInCombat())
|
||||
{
|
||||
@@ -868,14 +868,14 @@ class npc_scarlet_miner_cart : public CreatureScript
|
||||
public:
|
||||
npc_scarlet_miner_cart() : CreatureScript("npc_scarlet_miner_cart") { }
|
||||
|
||||
CreatureAI* GetAI(Creature *_Creature) const
|
||||
CreatureAI* GetAI(Creature* _Creature) const
|
||||
{
|
||||
return new npc_scarlet_miner_cartAI(_Creature);
|
||||
}
|
||||
|
||||
struct npc_scarlet_miner_cartAI : public PassiveAI
|
||||
{
|
||||
npc_scarlet_miner_cartAI(Creature *c) : PassiveAI(c), minerGUID(0)
|
||||
npc_scarlet_miner_cartAI(Creature* c) : PassiveAI(c), minerGUID(0)
|
||||
{
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
|
||||
me->SetDisplayId(me->GetCreatureInfo()->Modelid1); // Modelid2 is a horse.
|
||||
@@ -890,7 +890,7 @@ public:
|
||||
|
||||
void DoAction(const int32 /*param*/)
|
||||
{
|
||||
if (Creature *miner = Unit::GetCreature(*me, minerGUID))
|
||||
if (Creature* miner = Unit::GetCreature(*me, minerGUID))
|
||||
{
|
||||
me->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
|
||||
|
||||
@@ -905,7 +905,7 @@ public:
|
||||
void PassengerBoarded(Unit* /*who*/, int8 /*seatId*/, bool apply)
|
||||
{
|
||||
if (!apply)
|
||||
if (Creature *miner = Unit::GetCreature(*me, minerGUID))
|
||||
if (Creature* miner = Unit::GetCreature(*me, minerGUID))
|
||||
miner->DisappearAndDie();
|
||||
}
|
||||
};
|
||||
@@ -924,14 +924,14 @@ class npc_scarlet_miner : public CreatureScript
|
||||
public:
|
||||
npc_scarlet_miner() : CreatureScript("npc_scarlet_miner") { }
|
||||
|
||||
CreatureAI* GetAI(Creature *_Creature) const
|
||||
CreatureAI* GetAI(Creature* _Creature) const
|
||||
{
|
||||
return new npc_scarlet_minerAI(_Creature);
|
||||
}
|
||||
|
||||
struct npc_scarlet_minerAI : public npc_escortAI
|
||||
{
|
||||
npc_scarlet_minerAI(Creature *c) : npc_escortAI(c)
|
||||
npc_scarlet_minerAI(Creature* c) : npc_escortAI(c)
|
||||
{
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
@@ -980,7 +980,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void InitCartQuest(Player *who)
|
||||
void InitCartQuest(Player* who)
|
||||
{
|
||||
carGUID = who->GetVehicleBase()->GetGUID();
|
||||
InitWaypoint();
|
||||
@@ -993,7 +993,7 @@ public:
|
||||
switch (i)
|
||||
{
|
||||
case 1:
|
||||
if (Unit *car = Unit::GetCreature(*me, carGUID))
|
||||
if (Unit* car = Unit::GetCreature(*me, carGUID))
|
||||
{
|
||||
me->SetInFront(car);
|
||||
me->SendMovementFlagUpdate();
|
||||
@@ -1004,7 +1004,7 @@ public:
|
||||
IntroPhase = 1;
|
||||
break;
|
||||
case 17:
|
||||
if (Unit *car = Unit::GetCreature(*me, carGUID))
|
||||
if (Unit* car = Unit::GetCreature(*me, carGUID))
|
||||
{
|
||||
me->SetInFront(car);
|
||||
me->SendMovementFlagUpdate();
|
||||
@@ -1027,14 +1027,14 @@ public:
|
||||
{
|
||||
if (IntroPhase == 1)
|
||||
{
|
||||
if (Creature *car = Unit::GetCreature(*me, carGUID))
|
||||
if (Creature* car = Unit::GetCreature(*me, carGUID))
|
||||
DoCast(car, SPELL_CART_DRAG);
|
||||
IntroTimer = 800;
|
||||
IntroPhase = 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Creature *car = Unit::GetCreature(*me, carGUID))
|
||||
if (Creature* car = Unit::GetCreature(*me, carGUID))
|
||||
car->AI()->DoAction(0);
|
||||
IntroPhase = 0;
|
||||
}
|
||||
@@ -1062,10 +1062,10 @@ public:
|
||||
if (pPlayer->GetQuestStatus(12701) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
// Hack Why Trinity Dont Support Custom Summon Location
|
||||
if (Creature *miner = pPlayer->SummonCreature(28841, 2383.869629f, -5900.312500f, 107.996086f, pPlayer->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, 1))
|
||||
if (Creature* miner = pPlayer->SummonCreature(28841, 2383.869629f, -5900.312500f, 107.996086f, pPlayer->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, 1))
|
||||
{
|
||||
pPlayer->CastSpell(pPlayer, SPELL_CART_SUMM, true);
|
||||
if (Creature *car = pPlayer->GetVehicleCreatureBase())
|
||||
if (Creature* car = pPlayer->GetVehicleCreatureBase())
|
||||
{
|
||||
if (car->GetEntry() == 28817)
|
||||
{
|
||||
|
||||
@@ -56,7 +56,7 @@ public:
|
||||
|
||||
struct npc_crusade_persuadedAI : public ScriptedAI
|
||||
{
|
||||
npc_crusade_persuadedAI(Creature *pCreature) : ScriptedAI(pCreature) {}
|
||||
npc_crusade_persuadedAI(Creature* pCreature) : ScriptedAI(pCreature) {}
|
||||
|
||||
uint32 uiSpeech_timer;
|
||||
uint32 uiSpeech_counter;
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
me->RestoreFaction();
|
||||
}
|
||||
|
||||
void SpellHit(Unit *caster, const SpellEntry *spell)
|
||||
void SpellHit(Unit* caster, const SpellEntry *spell)
|
||||
{
|
||||
if (spell->Id == SPELL_PERSUASIVE_STRIKE && caster->GetTypeId() == TYPEID_PLAYER && me->isAlive() && !uiSpeech_counter)
|
||||
{
|
||||
@@ -196,7 +196,7 @@ public:
|
||||
|
||||
struct npc_koltira_deathweaverAI : public npc_escortAI
|
||||
{
|
||||
npc_koltira_deathweaverAI(Creature *pCreature) : npc_escortAI(pCreature)
|
||||
npc_koltira_deathweaverAI(Creature* pCreature) : npc_escortAI(pCreature)
|
||||
{
|
||||
me->SetReactState(REACT_DEFENSIVE);
|
||||
}
|
||||
@@ -363,7 +363,7 @@ public:
|
||||
|
||||
struct mob_scarlet_courierAI : public ScriptedAI
|
||||
{
|
||||
mob_scarlet_courierAI(Creature *pCreature) : ScriptedAI(pCreature) {}
|
||||
mob_scarlet_courierAI(Creature* pCreature) : ScriptedAI(pCreature) {}
|
||||
|
||||
uint32 uiStage;
|
||||
uint32 uiStage_timer;
|
||||
@@ -411,7 +411,7 @@ public:
|
||||
break;
|
||||
case 2:
|
||||
if (GameObject* tree = me->FindNearestGameObject(GO_INCONSPICUOUS_TREE, 40.0f))
|
||||
if (Unit *unit = tree->GetOwner())
|
||||
if (Unit* unit = tree->GetOwner())
|
||||
AttackStart(unit);
|
||||
break;
|
||||
}
|
||||
@@ -457,7 +457,7 @@ public:
|
||||
|
||||
struct mob_high_inquisitor_valrothAI : public ScriptedAI
|
||||
{
|
||||
mob_high_inquisitor_valrothAI(Creature *pCreature) : ScriptedAI(pCreature) {}
|
||||
mob_high_inquisitor_valrothAI(Creature* pCreature) : ScriptedAI(pCreature) {}
|
||||
|
||||
uint32 uiRenew_timer;
|
||||
uint32 uiInquisitor_Penance_timer;
|
||||
@@ -593,7 +593,7 @@ public:
|
||||
|
||||
struct npc_a_special_surpriseAI : public ScriptedAI
|
||||
{
|
||||
npc_a_special_surpriseAI(Creature *pCreature) : ScriptedAI(pCreature) {}
|
||||
npc_a_special_surpriseAI(Creature* pCreature) : ScriptedAI(pCreature) {}
|
||||
|
||||
uint32 ExecuteSpeech_Timer;
|
||||
uint32 ExecuteSpeech_Counter;
|
||||
|
||||
@@ -321,7 +321,7 @@ public:
|
||||
|
||||
struct npc_highlord_darion_mograineAI : public npc_escortAI
|
||||
{
|
||||
npc_highlord_darion_mograineAI(Creature *pCreature) : npc_escortAI(pCreature)
|
||||
npc_highlord_darion_mograineAI(Creature* pCreature) : npc_escortAI(pCreature)
|
||||
{
|
||||
Reset();
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ public:
|
||||
|
||||
struct npc_valkyr_battle_maidenAI : public PassiveAI
|
||||
{
|
||||
npc_valkyr_battle_maidenAI(Creature *c) : PassiveAI(c) {}
|
||||
npc_valkyr_battle_maidenAI(Creature* c) : PassiveAI(c) {}
|
||||
|
||||
uint32 FlyBackTimer;
|
||||
float x, y, z;
|
||||
@@ -60,13 +60,13 @@ public:
|
||||
{
|
||||
if (FlyBackTimer <= diff)
|
||||
{
|
||||
Player *plr = NULL;
|
||||
Player* player = NULL;
|
||||
if (me->isSummon())
|
||||
if (Unit *summoner = me->ToTempSummon()->GetSummoner())
|
||||
if (Unit* summoner = me->ToTempSummon()->GetSummoner())
|
||||
if (summoner->GetTypeId() == TYPEID_PLAYER)
|
||||
plr = CAST_PLR(summoner);
|
||||
player = CAST_PLR(summoner);
|
||||
|
||||
if (!plr)
|
||||
if (!player)
|
||||
phase = 3;
|
||||
|
||||
switch(phase)
|
||||
@@ -77,19 +77,19 @@ public:
|
||||
FlyBackTimer = 500;
|
||||
break;
|
||||
case 1:
|
||||
plr->GetClosePoint(x, y, z, me->GetObjectSize());
|
||||
player->GetClosePoint(x, y, z, me->GetObjectSize());
|
||||
z += 2.5; x -= 2; y -= 1.5;
|
||||
me->GetMotionMaster()->MovePoint(0, x, y, z);
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, plr->GetGUID());
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, player->GetGUID());
|
||||
me->SetVisible(true);
|
||||
FlyBackTimer = 4500;
|
||||
break;
|
||||
case 2:
|
||||
if (!plr->isRessurectRequested())
|
||||
if (!player->isRessurectRequested())
|
||||
{
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_CUSTOMSPELL01);
|
||||
DoCast(plr, SPELL_REVIVE, true);
|
||||
me->MonsterWhisper(VALK_WHISPER, plr->GetGUID());
|
||||
DoCast(player, SPELL_REVIVE, true);
|
||||
me->MonsterWhisper(VALK_WHISPER, player->GetGUID());
|
||||
}
|
||||
FlyBackTimer = 5000;
|
||||
break;
|
||||
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
|
||||
struct boss_arcanist_doanAI : public ScriptedAI
|
||||
{
|
||||
boss_arcanist_doanAI(Creature *c) : ScriptedAI(c) {}
|
||||
boss_arcanist_doanAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 Polymorph_Timer;
|
||||
uint32 AoESilence_Timer;
|
||||
@@ -101,7 +101,7 @@ public:
|
||||
|
||||
if (Polymorph_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
DoCast(pTarget, SPELL_POLYMORPH);
|
||||
|
||||
Polymorph_Timer = 20000;
|
||||
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
|
||||
struct boss_azshir_the_sleeplessAI : public ScriptedAI
|
||||
{
|
||||
boss_azshir_the_sleeplessAI(Creature *c) : ScriptedAI(c) {}
|
||||
boss_azshir_the_sleeplessAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 SoulSiphon_Timer;
|
||||
uint32 CallOftheGrave_Timer;
|
||||
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
|
||||
struct boss_bloodmage_thalnosAI : public ScriptedAI
|
||||
{
|
||||
boss_bloodmage_thalnosAI(Creature *c) : ScriptedAI(c) {}
|
||||
boss_bloodmage_thalnosAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
bool HpYell;
|
||||
uint32 FlameShock_Timer;
|
||||
|
||||
@@ -140,7 +140,7 @@ public:
|
||||
|
||||
struct mob_wisp_invisAI : public ScriptedAI
|
||||
{
|
||||
mob_wisp_invisAI(Creature *c) : ScriptedAI(c)
|
||||
mob_wisp_invisAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
Creaturetype = delay = spell = spell2 = 0;
|
||||
//that's hack but there are no info about range of this spells in dbc
|
||||
@@ -189,7 +189,7 @@ public:
|
||||
me->SetDisplayId(2027);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (!who || Creaturetype != 1 || !who->isTargetableForAttack())
|
||||
return;
|
||||
@@ -227,7 +227,7 @@ public:
|
||||
|
||||
struct mob_headAI : public ScriptedAI
|
||||
{
|
||||
mob_headAI(Creature *c) : ScriptedAI(c) {}
|
||||
mob_headAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint64 bodyGUID;
|
||||
|
||||
@@ -249,11 +249,11 @@ public:
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) {}
|
||||
void SaySound(int32 textEntry, Unit *pTarget = 0)
|
||||
void SaySound(int32 textEntry, Unit* pTarget = 0)
|
||||
{
|
||||
DoScriptText(textEntry, me, pTarget);
|
||||
//DoCast(me, SPELL_HEAD_SPEAKS, true);
|
||||
Creature *speaker = DoSpawnCreature(HELPER, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 1000);
|
||||
Creature* speaker = DoSpawnCreature(HELPER, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 1000);
|
||||
if (speaker)
|
||||
speaker->CastSpell(speaker, SPELL_HEAD_SPEAKS, false);
|
||||
laugh += 3000;
|
||||
@@ -290,7 +290,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void SpellHit(Unit *caster, const SpellEntry* spell)
|
||||
void SpellHit(Unit* caster, const SpellEntry* spell)
|
||||
{
|
||||
if (!withbody)
|
||||
return;
|
||||
@@ -330,7 +330,7 @@ public:
|
||||
laugh = urand(15000, 30000);
|
||||
DoPlaySoundToSet(me, RandomLaugh[urand(0, 2)]);
|
||||
//DoCast(me, SPELL_HEAD_SPEAKS, true); //this spell remove buff "head"
|
||||
Creature *speaker = DoSpawnCreature(HELPER, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 1000);
|
||||
Creature* speaker = DoSpawnCreature(HELPER, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 1000);
|
||||
if (speaker)
|
||||
speaker->CastSpell(speaker, SPELL_HEAD_SPEAKS, false);
|
||||
me->MonsterTextEmote(EMOTE_LAUGHS, 0);
|
||||
@@ -343,7 +343,7 @@ public:
|
||||
if (wait <= diff)
|
||||
{
|
||||
die = false;
|
||||
if (Unit *body = Unit::GetUnit((*me), bodyGUID))
|
||||
if (Unit* body = Unit::GetUnit((*me), bodyGUID))
|
||||
body->Kill(body);
|
||||
me->Kill(me);
|
||||
} else wait -= diff;
|
||||
@@ -366,7 +366,7 @@ public:
|
||||
|
||||
struct boss_headless_horsemanAI : public ScriptedAI
|
||||
{
|
||||
boss_headless_horsemanAI(Creature *c) : ScriptedAI(c)
|
||||
boss_headless_horsemanAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -451,7 +451,7 @@ public:
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
if (Creature *smoke = me->SummonCreature(HELPER, Spawn[1].x, Spawn[1].y, Spawn[1].z, 0, TEMPSUMMON_TIMED_DESPAWN, 20000))
|
||||
if (Creature* smoke = me->SummonCreature(HELPER, Spawn[1].x, Spawn[1].y, Spawn[1].z, 0, TEMPSUMMON_TIMED_DESPAWN, 20000))
|
||||
CAST_AI(mob_wisp_invis::mob_wisp_invisAI, smoke->AI())->SetType(3);
|
||||
DoCast(me, SPELL_RHYME_BIG);
|
||||
break;
|
||||
@@ -470,8 +470,8 @@ public:
|
||||
wp_reached = false;
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
SaySound(SAY_ENTRANCE);
|
||||
if (Unit *plr = Unit::GetUnit((*me), PlayerGUID))
|
||||
DoStartMovement(plr);
|
||||
if (Unit* player = Unit::GetUnit((*me), PlayerGUID))
|
||||
DoStartMovement(player);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -485,24 +485,24 @@ public:
|
||||
DoZoneInCombat();
|
||||
}
|
||||
void AttackStart(Unit* who) {ScriptedAI::AttackStart(who);}
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (withhead && Phase != 0)
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
}
|
||||
void KilledUnit(Unit *plr)
|
||||
void KilledUnit(Unit* player)
|
||||
{
|
||||
if (plr->GetTypeId() == TYPEID_PLAYER)
|
||||
if (player->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
if (withhead)
|
||||
SaySound(SAY_PLAYER_DEATH);
|
||||
//maybe possible when player dies from conflagration
|
||||
else if (Creature *Head = Unit::GetCreature((*me), headGUID))
|
||||
else if (Creature* Head = Unit::GetCreature((*me), headGUID))
|
||||
CAST_AI(mob_head::mob_headAI, Head->AI())->SaySound(SAY_PLAYER_DEATH);
|
||||
}
|
||||
}
|
||||
|
||||
void SaySound(int32 textEntry, Unit *pTarget = 0)
|
||||
void SaySound(int32 textEntry, Unit* pTarget = 0)
|
||||
{
|
||||
DoScriptText(textEntry, me, pTarget);
|
||||
laugh += 4000;
|
||||
@@ -545,15 +545,15 @@ public:
|
||||
me->StopMoving();
|
||||
//me->GetMotionMaster()->MoveIdle();
|
||||
SaySound(SAY_DEATH);
|
||||
if (Creature *flame = DoSpawnCreature(HELPER, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 60000))
|
||||
if (Creature* flame = DoSpawnCreature(HELPER, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 60000))
|
||||
flame->CastSpell(flame, SPELL_BODY_FLAME, false);
|
||||
if (Creature *wisp = DoSpawnCreature(WISP_INVIS, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 60000))
|
||||
if (Creature* wisp = DoSpawnCreature(WISP_INVIS, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 60000))
|
||||
CAST_AI(mob_wisp_invis::mob_wisp_invisAI, wisp->AI())->SetType(4);
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_HORSEMAN_EVENT, DONE);
|
||||
}
|
||||
|
||||
void SpellHit(Unit *caster, const SpellEntry* spell)
|
||||
void SpellHit(Unit* caster, const SpellEntry* spell)
|
||||
{
|
||||
if (withhead)
|
||||
return;
|
||||
@@ -583,7 +583,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void DamageTaken(Unit *done_by, uint32 &damage)
|
||||
void DamageTaken(Unit* done_by, uint32 &damage)
|
||||
{
|
||||
if (damage >= me->GetHealth() && withhead)
|
||||
{
|
||||
@@ -625,19 +625,19 @@ public:
|
||||
if (say_timer <= diff)
|
||||
{
|
||||
say_timer = 3000;
|
||||
Player *plr = SelectRandomPlayer(100.0f, false);
|
||||
Player* player = SelectRandomPlayer(100.0f, false);
|
||||
if (count < 3)
|
||||
{
|
||||
if (plr)
|
||||
plr->Say(Text[count], 0);
|
||||
if (player)
|
||||
player->Say(Text[count], 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
DoCast(me, SPELL_RHYME_BIG);
|
||||
if (plr)
|
||||
if (player)
|
||||
{
|
||||
plr->Say(Text[count], 0);
|
||||
plr->HandleEmoteCommand(ANIM_EMOTE_SHOUT);
|
||||
player->Say(Text[count], 0);
|
||||
player->HandleEmoteCommand(ANIM_EMOTE_SHOUT);
|
||||
}
|
||||
wp_reached = true;
|
||||
IsFlying = true;
|
||||
@@ -663,7 +663,7 @@ public:
|
||||
break;
|
||||
if (burn <= diff)
|
||||
{
|
||||
if (Creature *flame = me->SummonCreature(HELPER, Spawn[0].x, Spawn[0].y, Spawn[0].z, 0, TEMPSUMMON_TIMED_DESPAWN, 17000))
|
||||
if (Creature* flame = me->SummonCreature(HELPER, Spawn[0].x, Spawn[0].y, Spawn[0].z, 0, TEMPSUMMON_TIMED_DESPAWN, 17000))
|
||||
CAST_AI(mob_wisp_invis::mob_wisp_invisAI, flame->AI())->SetType(2);
|
||||
burned = true;
|
||||
} else burn -= diff;
|
||||
@@ -671,8 +671,8 @@ public:
|
||||
case 2:
|
||||
if (conflagrate <= diff)
|
||||
{
|
||||
if (Unit *plr = SelectRandomPlayer(30.0f))
|
||||
DoCast(plr, SPELL_CONFLAGRATION, false);
|
||||
if (Unit* player = SelectRandomPlayer(30.0f))
|
||||
DoCast(player, SPELL_CONFLAGRATION, false);
|
||||
conflagrate = urand(10000, 16000);
|
||||
} else conflagrate -= diff;
|
||||
break;
|
||||
@@ -755,7 +755,7 @@ public:
|
||||
|
||||
struct mob_pulsing_pumpkinAI : public ScriptedAI
|
||||
{
|
||||
mob_pulsing_pumpkinAI(Creature *c) : ScriptedAI(c) {}
|
||||
mob_pulsing_pumpkinAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
bool sprouted;
|
||||
uint64 debuffGUID;
|
||||
@@ -766,7 +766,7 @@ public:
|
||||
me->GetPosition(x, y, z); //this visual aura some under ground
|
||||
me->GetMap()->CreatureRelocation(me, x, y, z + 0.35f, 0.0f);
|
||||
Despawn();
|
||||
Creature *debuff = DoSpawnCreature(HELPER, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 14500);
|
||||
Creature* debuff = DoSpawnCreature(HELPER, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 14500);
|
||||
if (debuff)
|
||||
{
|
||||
debuff->SetDisplayId(me->GetDisplayId());
|
||||
@@ -798,7 +798,7 @@ public:
|
||||
void Despawn()
|
||||
{
|
||||
if (!debuffGUID) return;
|
||||
Unit *debuff = Unit::GetUnit((*me), debuffGUID);
|
||||
Unit* debuff = Unit::GetUnit((*me), debuffGUID);
|
||||
if (debuff)
|
||||
debuff->SetVisible(false);
|
||||
debuffGUID = 0;
|
||||
@@ -806,7 +806,7 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) { if (!sprouted) Despawn(); }
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (!who || !who->isTargetableForAttack() || !me->IsHostileTo(who) || me->getVictim())
|
||||
return;
|
||||
@@ -839,15 +839,15 @@ public:
|
||||
return true;
|
||||
pInstance->SetData(DATA_HORSEMAN_EVENT, IN_PROGRESS);
|
||||
}
|
||||
/* if (soil->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER && plr->getLevel() > 64)
|
||||
/* if (soil->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER && player->getLevel() > 64)
|
||||
{
|
||||
plr->PrepareQuestMenu(soil->GetGUID());
|
||||
plr->SendPreparedQuest(soil->GetGUID());
|
||||
player->PrepareQuestMenu(soil->GetGUID());
|
||||
player->SendPreparedQuest(soil->GetGUID());
|
||||
}
|
||||
if (plr->GetQuestStatus(11405) == QUEST_STATUS_INCOMPLETE && plr->getLevel() > 64)
|
||||
if (player->GetQuestStatus(11405) == QUEST_STATUS_INCOMPLETE && player->getLevel() > 64)
|
||||
{ */
|
||||
pPlayer->AreaExploredOrEventHappens(11405);
|
||||
if (Creature *horseman = soil->SummonCreature(HH_MOUNTED, FlightPoint[20].x, FlightPoint[20].y, FlightPoint[20].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 0))
|
||||
if (Creature* horseman = soil->SummonCreature(HH_MOUNTED, FlightPoint[20].x, FlightPoint[20].y, FlightPoint[20].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 0))
|
||||
{
|
||||
CAST_AI(boss_headless_horseman::boss_headless_horsemanAI, horseman->AI())->PlayerGUID = pPlayer->GetGUID();
|
||||
CAST_AI(boss_headless_horseman::boss_headless_horsemanAI, horseman->AI())->FlyMode();
|
||||
@@ -864,7 +864,7 @@ void mob_head::mob_headAI::Disappear()
|
||||
return;
|
||||
if (bodyGUID)
|
||||
{
|
||||
Creature *body = Unit::GetCreature((*me), bodyGUID);
|
||||
Creature* body = Unit::GetCreature((*me), bodyGUID);
|
||||
if (body && body->isAlive())
|
||||
{
|
||||
withbody = true;
|
||||
|
||||
@@ -52,7 +52,7 @@ public:
|
||||
|
||||
struct boss_herodAI : public ScriptedAI
|
||||
{
|
||||
boss_herodAI(Creature *c) : ScriptedAI(c) {}
|
||||
boss_herodAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
bool Enrage;
|
||||
|
||||
@@ -130,7 +130,7 @@ public:
|
||||
|
||||
struct mob_scarlet_traineeAI : public npc_escortAI
|
||||
{
|
||||
mob_scarlet_traineeAI(Creature *c) : npc_escortAI(c)
|
||||
mob_scarlet_traineeAI(Creature* c) : npc_escortAI(c)
|
||||
{
|
||||
Start_Timer = urand(1000, 6000);
|
||||
}
|
||||
|
||||
+4
-4
@@ -47,7 +47,7 @@ public:
|
||||
|
||||
struct boss_high_inquisitor_fairbanksAI : public ScriptedAI
|
||||
{
|
||||
boss_high_inquisitor_fairbanksAI(Creature *c) : ScriptedAI(c) {}
|
||||
boss_high_inquisitor_fairbanksAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 CurseOfBlood_Timer;
|
||||
uint32 DispelMagic_Timer;
|
||||
@@ -87,7 +87,7 @@ public:
|
||||
//Fear_Timer
|
||||
if (Fear_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
DoCast(pTarget, SPELL_FEAR);
|
||||
|
||||
Fear_Timer = 40000;
|
||||
@@ -96,7 +96,7 @@ public:
|
||||
//Sleep_Timer
|
||||
if (Sleep_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_TOPAGGRO, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_TOPAGGRO, 0))
|
||||
DoCast(pTarget, SPELL_SLEEP);
|
||||
|
||||
Sleep_Timer = 30000;
|
||||
@@ -112,7 +112,7 @@ public:
|
||||
//Dispel_Timer
|
||||
if (Dispel_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_DISPELMAGIC);
|
||||
|
||||
DispelMagic_Timer = 30000;
|
||||
|
||||
@@ -44,7 +44,7 @@ public:
|
||||
|
||||
struct boss_houndmaster_lokseyAI : public ScriptedAI
|
||||
{
|
||||
boss_houndmaster_lokseyAI(Creature *c) : ScriptedAI(c) {}
|
||||
boss_houndmaster_lokseyAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 BloodLust_Timer;
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
|
||||
struct boss_interrogator_vishasAI : public ScriptedAI
|
||||
{
|
||||
boss_interrogator_vishasAI(Creature *c) : ScriptedAI(c)
|
||||
boss_interrogator_vishasAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = me->GetInstanceScript();
|
||||
}
|
||||
@@ -81,7 +81,7 @@ public:
|
||||
return;
|
||||
|
||||
//Any other actions to do with vorrel? setStandState?
|
||||
if (Unit *vorrel = Unit::GetUnit(*me, pInstance->GetData64(DATA_VORREL)))
|
||||
if (Unit* vorrel = Unit::GetUnit(*me, pInstance->GetData64(DATA_VORREL)))
|
||||
DoScriptText(SAY_TRIGGER_VORREL, vorrel);
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
|
||||
struct boss_scornAI : public ScriptedAI
|
||||
{
|
||||
boss_scornAI(Creature *c) : ScriptedAI(c) {}
|
||||
boss_scornAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 LichSlap_Timer;
|
||||
uint32 FrostboltVolley_Timer;
|
||||
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
|
||||
struct boss_darkmaster_gandlingAI : public ScriptedAI
|
||||
{
|
||||
boss_darkmaster_gandlingAI(Creature *c) : ScriptedAI(c)
|
||||
boss_darkmaster_gandlingAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = me->GetInstanceScript();
|
||||
}
|
||||
@@ -124,14 +124,14 @@ public:
|
||||
{
|
||||
if (Teleport_Timer <= diff)
|
||||
{
|
||||
Unit *pTarget = NULL;
|
||||
Unit* pTarget = NULL;
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
if (DoGetThreat(pTarget))
|
||||
DoModifyThreatPercent(pTarget, -100);
|
||||
|
||||
Creature *Summoned = NULL;
|
||||
Creature* Summoned = NULL;
|
||||
switch(rand()%6)
|
||||
{
|
||||
case 0:
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
|
||||
struct boss_death_knight_darkreaverAI : public ScriptedAI
|
||||
{
|
||||
boss_death_knight_darkreaverAI(Creature *c) : ScriptedAI(c) {}
|
||||
boss_death_knight_darkreaverAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user