Add spaces after commas
This commit is contained in:
@@ -107,7 +107,7 @@ public:
|
||||
switch(result)
|
||||
{
|
||||
case AOR_OK:
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_CREATED,account_name.c_str());
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_CREATED, account_name.c_str());
|
||||
break;
|
||||
case AOR_NAME_TOO_LONG:
|
||||
handler->SendSysMessage(LANG_ACCOUNT_TOO_LONG);
|
||||
@@ -118,11 +118,11 @@ public:
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
case AOR_DB_INTERNAL_ERROR:
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_NOT_CREATED_SQL_ERROR,account_name.c_str());
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_NOT_CREATED_SQL_ERROR, account_name.c_str());
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
default:
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_NOT_CREATED,account_name.c_str());
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_NOT_CREATED, account_name.c_str());
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
@@ -138,14 +138,14 @@ public:
|
||||
return false;
|
||||
|
||||
///- Get the account name from the command line
|
||||
char *account_name_str=strtok ((char*)args," ");
|
||||
char *account_name_str=strtok ((char*)args, " ");
|
||||
if (!account_name_str)
|
||||
return false;
|
||||
|
||||
std::string account_name = account_name_str;
|
||||
if (!AccountMgr::normalizeString(account_name))
|
||||
{
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST,account_name.c_str());
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, account_name.c_str());
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
@@ -153,7 +153,7 @@ public:
|
||||
uint32 account_id = sAccountMgr->GetId(account_name);
|
||||
if (!account_id)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST,account_name.c_str());
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, account_name.c_str());
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
@@ -161,25 +161,25 @@ public:
|
||||
/// Commands not recommended call from chat, but support anyway
|
||||
/// can delete only for account with less security
|
||||
/// This is also reject self apply in fact
|
||||
if (handler->HasLowerSecurityAccount (NULL,account_id,true))
|
||||
if (handler->HasLowerSecurityAccount (NULL, account_id, true))
|
||||
return false;
|
||||
|
||||
AccountOpResult result = sAccountMgr->DeleteAccount(account_id);
|
||||
switch(result)
|
||||
{
|
||||
case AOR_OK:
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_DELETED,account_name.c_str());
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_DELETED, account_name.c_str());
|
||||
break;
|
||||
case AOR_NAME_NOT_EXIST:
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST,account_name.c_str());
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, account_name.c_str());
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
case AOR_DB_INTERNAL_ERROR:
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_NOT_DELETED_SQL_ERROR,account_name.c_str());
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_NOT_DELETED_SQL_ERROR, account_name.c_str());
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
default:
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_NOT_DELETED,account_name.c_str());
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_NOT_DELETED, account_name.c_str());
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
@@ -191,7 +191,7 @@ public:
|
||||
static bool HandleAccountOnlineListCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
///- Get the list of accounts ID logged to the realm
|
||||
QueryResult resultDB = CharacterDatabase.Query("SELECT name,account,map,zone FROM characters WHERE online > 0");
|
||||
QueryResult resultDB = CharacterDatabase.Query("SELECT name, account, map, zone FROM characters WHERE online > 0");
|
||||
if (!resultDB)
|
||||
{
|
||||
handler->SendSysMessage(LANG_ACCOUNT_LIST_EMPTY);
|
||||
@@ -222,10 +222,10 @@ public:
|
||||
{
|
||||
Field *fieldsLogin = resultLogin->Fetch();
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_LIST_LINE,
|
||||
fieldsLogin[0].GetCString(),name.c_str(),fieldsLogin[1].GetCString(),fieldsDB[2].GetUInt16(),fieldsDB[3].GetUInt16(),fieldsLogin[3].GetUInt32(),fieldsLogin[2].GetUInt32());
|
||||
fieldsLogin[0].GetCString(), name.c_str(), fieldsLogin[1].GetCString(), fieldsDB[2].GetUInt16(), fieldsDB[3].GetUInt16(), fieldsLogin[3].GetUInt32(), fieldsLogin[2].GetUInt32());
|
||||
}
|
||||
else
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_LIST_ERROR,name.c_str());
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_LIST_ERROR, name.c_str());
|
||||
|
||||
}while (resultDB->NextRow());
|
||||
|
||||
@@ -245,14 +245,14 @@ public:
|
||||
std::string argstr = (char*)args;
|
||||
if (argstr == "on")
|
||||
{
|
||||
LoginDatabase.PExecute("UPDATE account SET locked = '1' WHERE id = '%d'",handler->GetSession()->GetAccountId());
|
||||
LoginDatabase.PExecute("UPDATE account SET locked = '1' WHERE id = '%d'", handler->GetSession()->GetAccountId());
|
||||
handler->PSendSysMessage(LANG_COMMAND_ACCLOCKLOCKED);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (argstr == "off")
|
||||
{
|
||||
LoginDatabase.PExecute("UPDATE account SET locked = '0' WHERE id = '%d'",handler->GetSession()->GetAccountId());
|
||||
LoginDatabase.PExecute("UPDATE account SET locked = '0' WHERE id = '%d'", handler->GetSession()->GetAccountId());
|
||||
handler->PSendSysMessage(LANG_COMMAND_ACCLOCKUNLOCKED);
|
||||
return true;
|
||||
}
|
||||
@@ -330,8 +330,8 @@ public:
|
||||
static bool HandleAccountSetAddonCommand(ChatHandler* handler, const char *args)
|
||||
{
|
||||
///- Get the command line arguments
|
||||
char *szAcc = strtok((char*)args," ");
|
||||
char *szExp = strtok(NULL," ");
|
||||
char *szAcc = strtok((char*)args, " ");
|
||||
char *szExp = strtok(NULL, " ");
|
||||
|
||||
if (!szAcc)
|
||||
return false;
|
||||
@@ -346,7 +346,7 @@ public:
|
||||
return false;
|
||||
|
||||
account_id = player->GetSession()->GetAccountId();
|
||||
sAccountMgr->GetName(account_id,account_name);
|
||||
sAccountMgr->GetName(account_id, account_name);
|
||||
szExp = szAcc;
|
||||
}
|
||||
else
|
||||
@@ -355,7 +355,7 @@ public:
|
||||
account_name = szAcc;
|
||||
if (!AccountMgr::normalizeString(account_name))
|
||||
{
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST,account_name.c_str());
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, account_name.c_str());
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
@@ -363,7 +363,7 @@ public:
|
||||
account_id = sAccountMgr->GetId(account_name);
|
||||
if (!account_id)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST,account_name.c_str());
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, account_name.c_str());
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
@@ -373,7 +373,7 @@ public:
|
||||
// Let set addon state only for lesser (strong) security level
|
||||
// or to self account
|
||||
if (handler->GetSession() && handler->GetSession()->GetAccountId () != account_id &&
|
||||
handler->HasLowerSecurityAccount (NULL,account_id,true))
|
||||
handler->HasLowerSecurityAccount (NULL, account_id, true))
|
||||
return false;
|
||||
|
||||
int expansion = atoi(szExp); //get int anyway (0 if error)
|
||||
@@ -381,8 +381,8 @@ public:
|
||||
return false;
|
||||
|
||||
// No SQL injection
|
||||
LoginDatabase.PExecute("UPDATE account SET expansion = '%d' WHERE id = '%u'",expansion,account_id);
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_SETADDON,account_name.c_str(),account_id,expansion);
|
||||
LoginDatabase.PExecute("UPDATE account SET expansion = '%d' WHERE id = '%u'", expansion, account_id);
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_SETADDON, account_name.c_str(), account_id, expansion);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -417,7 +417,7 @@ public:
|
||||
targetAccountName = arg1;
|
||||
if (!AccountMgr::normalizeString(targetAccountName))
|
||||
{
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST,targetAccountName.c_str());
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, targetAccountName.c_str());
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
@@ -478,7 +478,7 @@ public:
|
||||
LoginDatabase.PExecute("DELETE FROM account_access WHERE id = '%u' AND (RealmID = '%d' OR RealmID = '-1')", targetAccountId, realmID);
|
||||
|
||||
if (gm != 0)
|
||||
LoginDatabase.PExecute("INSERT INTO account_access VALUES ('%u','%d','%d')", targetAccountId, gm, realmID);
|
||||
LoginDatabase.PExecute("INSERT INTO account_access VALUES ('%u', '%d', '%d')", targetAccountId, gm, realmID);
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_SECURITY, targetAccountName.c_str(), gm);
|
||||
return true;
|
||||
}
|
||||
@@ -490,9 +490,9 @@ public:
|
||||
return false;
|
||||
|
||||
///- Get the command line arguments
|
||||
char *szAccount = strtok ((char*)args," ");
|
||||
char *szPassword1 = strtok (NULL," ");
|
||||
char *szPassword2 = strtok (NULL," ");
|
||||
char *szAccount = strtok ((char*)args, " ");
|
||||
char *szPassword1 = strtok (NULL, " ");
|
||||
char *szPassword2 = strtok (NULL, " ");
|
||||
|
||||
if (!szAccount||!szPassword1 || !szPassword2)
|
||||
return false;
|
||||
@@ -500,7 +500,7 @@ public:
|
||||
std::string account_name = szAccount;
|
||||
if (!AccountMgr::normalizeString(account_name))
|
||||
{
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST,account_name.c_str());
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, account_name.c_str());
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
@@ -508,17 +508,17 @@ public:
|
||||
uint32 targetAccountId = sAccountMgr->GetId(account_name);
|
||||
if (!targetAccountId)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST,account_name.c_str());
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, account_name.c_str());
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
/// can set password only for target with less security
|
||||
/// This is also reject self apply in fact
|
||||
if (handler->HasLowerSecurityAccount (NULL,targetAccountId,true))
|
||||
if (handler->HasLowerSecurityAccount (NULL, targetAccountId, true))
|
||||
return false;
|
||||
|
||||
if (strcmp(szPassword1,szPassword2))
|
||||
if (strcmp(szPassword1, szPassword2))
|
||||
{
|
||||
handler->SendSysMessage (LANG_NEW_PASSWORDS_NOT_MATCH);
|
||||
handler->SetSentErrorMessage (true);
|
||||
@@ -533,7 +533,7 @@ public:
|
||||
handler->SendSysMessage(LANG_COMMAND_PASSWORD);
|
||||
break;
|
||||
case AOR_NAME_NOT_EXIST:
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST,account_name.c_str());
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, account_name.c_str());
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
case AOR_PASS_TOO_LONG:
|
||||
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
{ "opcode", SEC_ADMINISTRATOR, false, &HandleDebugSendOpcodeCommand, "", NULL },
|
||||
{ "poi", SEC_ADMINISTRATOR, false, &HandleDebugSendPoiCommand, "", NULL },
|
||||
{ "qpartymsg", SEC_ADMINISTRATOR, false, &HandleDebugSendQuestPartyMsgCommand, "", NULL },
|
||||
{ "qinvalidmsg", SEC_ADMINISTRATOR, false, &HandleDebugSendQuestInvalidMsgCommand,"", NULL },
|
||||
{ "qinvalidmsg", SEC_ADMINISTRATOR, false, &HandleDebugSendQuestInvalidMsgCommand, "", NULL },
|
||||
{ "sellerror", SEC_ADMINISTRATOR, false, &HandleDebugSendSellErrorCommand, "", NULL },
|
||||
{ "setphaseshift", SEC_ADMINISTRATOR, false, &HandleDebugSendSetPhaseShiftCommand, "", NULL },
|
||||
{ "spellfail", SEC_ADMINISTRATOR, false, &HandleDebugSendSpellFailCommand, "", NULL },
|
||||
@@ -73,7 +73,7 @@ public:
|
||||
{ "arena", SEC_ADMINISTRATOR, false, &HandleDebugArenaCommand, "", NULL },
|
||||
{ "bg", SEC_ADMINISTRATOR, false, &HandleDebugBattlegroundCommand, "", NULL },
|
||||
{ "getitemstate", SEC_ADMINISTRATOR, false, &HandleDebugGetItemStateCommand, "", NULL },
|
||||
{ "lootrecipient", SEC_GAMEMASTER, false, &HandleDebugGetLootRecipientCommand,"", NULL },
|
||||
{ "lootrecipient", SEC_GAMEMASTER, false, &HandleDebugGetLootRecipientCommand, "", NULL },
|
||||
{ "getvalue", SEC_ADMINISTRATOR, false, &HandleDebugGetValueCommand, "", NULL },
|
||||
{ "getitemvalue", SEC_ADMINISTRATOR, false, &HandleDebugGetItemValueCommand, "", NULL },
|
||||
{ "Mod32Value", SEC_ADMINISTRATOR, false, &HandleDebugMod32ValueCommand, "", NULL },
|
||||
@@ -85,7 +85,7 @@ public:
|
||||
{ "spawnvehicle", SEC_ADMINISTRATOR, false, &HandleDebugSpawnVehicleCommand, "", NULL },
|
||||
{ "setvid", SEC_ADMINISTRATOR, false, &HandleDebugSetVehicleIdCommand, "", NULL },
|
||||
{ "entervehicle", SEC_ADMINISTRATOR, false, &HandleDebugEnterVehicleCommand, "", NULL },
|
||||
{ "uws", SEC_ADMINISTRATOR, false, &HandleDebugUpdateWorldStateCommand,"", NULL },
|
||||
{ "uws", SEC_ADMINISTRATOR, false, &HandleDebugUpdateWorldStateCommand, "", NULL },
|
||||
{ "update", SEC_ADMINISTRATOR, false, &HandleDebugUpdateCommand, "", NULL },
|
||||
{ "itemexpire", SEC_ADMINISTRATOR, false, &HandleDebugItemExpireCommand, "", NULL },
|
||||
{ "areatriggers", SEC_ADMINISTRATOR, false, &HandleDebugAreaTriggersCommand, "", NULL },
|
||||
@@ -177,9 +177,9 @@ public:
|
||||
}
|
||||
|
||||
if (handler->GetSession()->GetPlayer()->GetSelection())
|
||||
unit->PlayDistanceSound(dwSoundId,handler->GetSession()->GetPlayer());
|
||||
unit->PlayDistanceSound(dwSoundId, handler->GetSession()->GetPlayer());
|
||||
else
|
||||
unit->PlayDirectSound(dwSoundId,handler->GetSession()->GetPlayer());
|
||||
unit->PlayDirectSound(dwSoundId, handler->GetSession()->GetPlayer());
|
||||
|
||||
handler->PSendSysMessage(LANG_YOU_HEAR_SOUND, dwSoundId);
|
||||
return true;
|
||||
@@ -239,7 +239,7 @@ public:
|
||||
uint32 icon = atol(icon_text);
|
||||
uint32 flags = atol(flags_text);
|
||||
|
||||
sLog->outDetail("Command : POI, NPC = %u, icon = %u flags = %u", target->GetGUIDLow(), icon,flags);
|
||||
sLog->outDetail("Command : POI, NPC = %u, icon = %u flags = %u", target->GetGUIDLow(), icon, flags);
|
||||
pPlayer->PlayerTalkClass->SendPointOfInterest(target->GetPositionX(), target->GetPositionY(), Poi_Icon(icon), flags, 30, "Test POI");
|
||||
return true;
|
||||
}
|
||||
@@ -736,14 +736,14 @@ public:
|
||||
std::list<HostileReference*>& tlist = target->getThreatManager().getThreatList();
|
||||
std::list<HostileReference*>::iterator itr;
|
||||
uint32 cnt = 0;
|
||||
handler->PSendSysMessage("Threat list of %s (guid %u)",target->GetName(), target->GetGUIDLow());
|
||||
handler->PSendSysMessage("Threat list of %s (guid %u)", target->GetName(), target->GetGUIDLow());
|
||||
for (itr = tlist.begin(); itr != tlist.end(); ++itr)
|
||||
{
|
||||
Unit* unit = (*itr)->getTarget();
|
||||
if (!unit)
|
||||
continue;
|
||||
++cnt;
|
||||
handler->PSendSysMessage(" %u. %s (guid %u) - threat %f",cnt,unit->GetName(), unit->GetGUIDLow(), (*itr)->getThreat());
|
||||
handler->PSendSysMessage(" %u. %s (guid %u) - threat %f", cnt, unit->GetName(), unit->GetGUIDLow(), (*itr)->getThreat());
|
||||
}
|
||||
handler->SendSysMessage("End of threat list.");
|
||||
return true;
|
||||
@@ -756,13 +756,13 @@ public:
|
||||
target = handler->GetSession()->GetPlayer();
|
||||
HostileReference* ref = target->getHostileRefManager().getFirst();
|
||||
uint32 cnt = 0;
|
||||
handler->PSendSysMessage("Hostil reference list of %s (guid %u)",target->GetName(), target->GetGUIDLow());
|
||||
handler->PSendSysMessage("Hostil reference list of %s (guid %u)", target->GetName(), target->GetGUIDLow());
|
||||
while (ref)
|
||||
{
|
||||
if (Unit * unit = ref->getSource()->getOwner())
|
||||
{
|
||||
++cnt;
|
||||
handler->PSendSysMessage(" %u. %s (guid %u) - threat %f",cnt,unit->GetName(), unit->GetGUIDLow(), ref->getThreat());
|
||||
handler->PSendSysMessage(" %u. %s (guid %u) - threat %f", cnt, unit->GetName(), unit->GetGUIDLow(), ref->getThreat());
|
||||
}
|
||||
ref = ref->next();
|
||||
}
|
||||
@@ -1003,11 +1003,11 @@ public:
|
||||
{
|
||||
// reset all states
|
||||
for (int i = 1; i <= 32; ++i)
|
||||
unit->ModifyAuraState(AuraState(i),false);
|
||||
unit->ModifyAuraState(AuraState(i), false);
|
||||
return true;
|
||||
}
|
||||
|
||||
unit->ModifyAuraState(AuraState(abs(state)),state > 0);
|
||||
unit->ModifyAuraState(AuraState(abs(state)), state > 0);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1048,13 +1048,13 @@ public:
|
||||
{
|
||||
iValue = (uint32)atoi(py);
|
||||
target->SetUInt32Value(Opcode , iValue);
|
||||
handler->PSendSysMessage(LANG_SET_UINT_FIELD, GUID_LOPART(guid), Opcode,iValue);
|
||||
handler->PSendSysMessage(LANG_SET_UINT_FIELD, GUID_LOPART(guid), Opcode, iValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
fValue = (float)atof(py);
|
||||
target->SetFloatValue(Opcode , fValue);
|
||||
handler->PSendSysMessage(LANG_SET_FLOAT_FIELD, GUID_LOPART(guid), Opcode,fValue);
|
||||
handler->PSendSysMessage(LANG_SET_FLOAT_FIELD, GUID_LOPART(guid), Opcode, fValue);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -1132,7 +1132,7 @@ public:
|
||||
CurrentValue += Value;
|
||||
handler->GetSession()->GetPlayer()->SetUInt32Value(Opcode , (uint32)CurrentValue);
|
||||
|
||||
handler->PSendSysMessage(LANG_CHANGE_32BIT_FIELD, Opcode,CurrentValue);
|
||||
handler->PSendSysMessage(LANG_CHANGE_32BIT_FIELD, Opcode, CurrentValue);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1175,15 +1175,15 @@ public:
|
||||
{
|
||||
value=chr->GetUInt32Value(updateIndex);
|
||||
|
||||
handler->PSendSysMessage(LANG_UPDATE, chr->GetGUIDLow(),updateIndex,value);
|
||||
handler->PSendSysMessage(LANG_UPDATE, chr->GetGUIDLow(), updateIndex, value);
|
||||
return true;
|
||||
}
|
||||
|
||||
value=atoi(pvalue);
|
||||
|
||||
handler->PSendSysMessage(LANG_UPDATE_CHANGE, chr->GetGUIDLow(),updateIndex,value);
|
||||
handler->PSendSysMessage(LANG_UPDATE_CHANGE, chr->GetGUIDLow(), updateIndex, value);
|
||||
|
||||
chr->SetUInt32Value(updateIndex,value);
|
||||
chr->SetUInt32Value(updateIndex, value);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -64,9 +64,9 @@ public:
|
||||
GameEventData const& eventData = events[event_id];
|
||||
|
||||
if (handler->GetSession())
|
||||
handler->PSendSysMessage(LANG_EVENT_ENTRY_LIST_CHAT,event_id,event_id,eventData.description.c_str(),active);
|
||||
handler->PSendSysMessage(LANG_EVENT_ENTRY_LIST_CHAT, event_id, event_id, eventData.description.c_str(), active);
|
||||
else
|
||||
handler->PSendSysMessage(LANG_EVENT_ENTRY_LIST_CONSOLE,event_id,eventData.description.c_str(),active);
|
||||
handler->PSendSysMessage(LANG_EVENT_ENTRY_LIST_CONSOLE, event_id, eventData.description.c_str(), active);
|
||||
|
||||
++counter;
|
||||
}
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
return false;
|
||||
|
||||
// id or [name] Shift-click form |color|Hgameevent:id|h[name]|h|r
|
||||
char* cId = handler->extractKeyFromLink((char*)args,"Hgameevent");
|
||||
char* cId = handler->extractKeyFromLink((char*)args, "Hgameevent");
|
||||
if (!cId)
|
||||
return false;
|
||||
|
||||
@@ -121,8 +121,8 @@ public:
|
||||
std::string occurenceStr = secsToTimeString(eventData.occurence * MINUTE);
|
||||
std::string lengthStr = secsToTimeString(eventData.length * MINUTE);
|
||||
|
||||
handler->PSendSysMessage(LANG_EVENT_INFO,event_id,eventData.description.c_str(),activeStr,
|
||||
startTimeStr.c_str(),endTimeStr.c_str(),occurenceStr.c_str(),lengthStr.c_str(),
|
||||
handler->PSendSysMessage(LANG_EVENT_INFO, event_id, eventData.description.c_str(), activeStr,
|
||||
startTimeStr.c_str(), endTimeStr.c_str(), occurenceStr.c_str(), lengthStr.c_str(),
|
||||
nextStr.c_str());
|
||||
return true;
|
||||
}
|
||||
@@ -133,7 +133,7 @@ public:
|
||||
return false;
|
||||
|
||||
// id or [name] Shift-click form |color|Hgameevent:id|h[name]|h|r
|
||||
char* cId = handler->extractKeyFromLink((char*)args,"Hgameevent");
|
||||
char* cId = handler->extractKeyFromLink((char*)args, "Hgameevent");
|
||||
if (!cId)
|
||||
return false;
|
||||
|
||||
@@ -159,12 +159,12 @@ public:
|
||||
GameEventMgr::ActiveEvents const& activeEvents = sGameEventMgr->GetActiveEventList();
|
||||
if (activeEvents.find(event_id) != activeEvents.end())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_EVENT_ALREADY_ACTIVE,event_id);
|
||||
handler->PSendSysMessage(LANG_EVENT_ALREADY_ACTIVE, event_id);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
sGameEventMgr->StartEvent(event_id,true);
|
||||
sGameEventMgr->StartEvent(event_id, true);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ public:
|
||||
return false;
|
||||
|
||||
// id or [name] Shift-click form |color|Hgameevent:id|h[name]|h|r
|
||||
char* cId = handler->extractKeyFromLink((char*)args,"Hgameevent");
|
||||
char* cId = handler->extractKeyFromLink((char*)args, "Hgameevent");
|
||||
if (!cId)
|
||||
return false;
|
||||
|
||||
@@ -201,12 +201,12 @@ public:
|
||||
|
||||
if (activeEvents.find(event_id) == activeEvents.end())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_EVENT_NOT_ACTIVE,event_id);
|
||||
handler->PSendSysMessage(LANG_EVENT_NOT_ACTIVE, event_id);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
sGameEventMgr->StopEvent(event_id,true);
|
||||
sGameEventMgr->StopEvent(event_id, true);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -153,7 +153,7 @@ public:
|
||||
static bool HandleGMListFullCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
///- Get the accounts with GM Level >0
|
||||
QueryResult result = LoginDatabase.Query("SELECT a.username,aa.gmlevel FROM account a, account_access aa WHERE a.id=aa.id AND aa.gmlevel > 0");
|
||||
QueryResult result = LoginDatabase.Query("SELECT a.username, aa.gmlevel FROM account a, account_access aa WHERE a.id=aa.id AND aa.gmlevel > 0");
|
||||
if (result)
|
||||
{
|
||||
handler->SendSysMessage(LANG_GMLIST);
|
||||
|
||||
@@ -76,7 +76,7 @@ public:
|
||||
Player* _player = handler->GetSession()->GetPlayer();
|
||||
|
||||
// "id" or number or [name] Shift-click form |color|Hcreature_entry:creature_id|h[name]|h|r
|
||||
char* pParam1 = handler->extractKeyFromLink((char*)args,"Hcreature");
|
||||
char* pParam1 = handler->extractKeyFromLink((char*)args, "Hcreature");
|
||||
if (!pParam1)
|
||||
return false;
|
||||
|
||||
@@ -89,10 +89,10 @@ public:
|
||||
|
||||
// Get the "creature_template.entry"
|
||||
// number or [name] Shift-click form |color|Hcreature_entry:creature_id|h[name]|h|r
|
||||
char* tail = strtok(NULL,"");
|
||||
char* tail = strtok(NULL, "");
|
||||
if (!tail)
|
||||
return false;
|
||||
char* cId = handler->extractKeyFromLink(tail,"Hcreature_entry");
|
||||
char* cId = handler->extractKeyFromLink(tail, "Hcreature_entry");
|
||||
if (!cId)
|
||||
return false;
|
||||
|
||||
@@ -123,7 +123,7 @@ public:
|
||||
}
|
||||
//sLog->outError("DEBUG: %s", whereClause.c_str());
|
||||
|
||||
QueryResult result = WorldDatabase.PQuery("SELECT position_x,position_y,position_z,orientation,map FROM creature %s", whereClause.str().c_str());
|
||||
QueryResult result = WorldDatabase.PQuery("SELECT position_x, position_y, position_z, orientation, map FROM creature %s", whereClause.str().c_str());
|
||||
if (!result)
|
||||
{
|
||||
handler->SendSysMessage(LANG_COMMAND_GOCREATNOTFOUND);
|
||||
@@ -140,9 +140,9 @@ public:
|
||||
float ort = fields[3].GetFloat();
|
||||
int mapid = fields[4].GetUInt16();
|
||||
|
||||
if (!MapManager::IsValidMapCoord(mapid,x,y,z,ort))
|
||||
if (!MapManager::IsValidMapCoord(mapid, x, y, z, ort))
|
||||
{
|
||||
handler->PSendSysMessage(LANG_INVALID_TARGET_COORD,x,y,mapid);
|
||||
handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, x, y, mapid);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
@@ -179,14 +179,14 @@ public:
|
||||
WorldSafeLocsEntry const* gy = sWorldSafeLocsStore.LookupEntry(i_gyId);
|
||||
if (!gy)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_COMMAND_GRAVEYARDNOEXIST,i_gyId);
|
||||
handler->PSendSysMessage(LANG_COMMAND_GRAVEYARDNOEXIST, i_gyId);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!MapManager::IsValidMapCoord(gy->map_id,gy->x,gy->y,gy->z))
|
||||
if (!MapManager::IsValidMapCoord(gy->map_id, gy->x, gy->y, gy->z))
|
||||
{
|
||||
handler->PSendSysMessage(LANG_INVALID_TARGET_COORD,gy->x,gy->y,gy->map_id);
|
||||
handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, gy->x, gy->y, gy->map_id);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
@@ -228,9 +228,9 @@ public:
|
||||
float x = (grid_x-CENTER_GRID_ID+0.5f)*SIZE_OF_GRIDS;
|
||||
float y = (grid_y-CENTER_GRID_ID+0.5f)*SIZE_OF_GRIDS;
|
||||
|
||||
if (!MapManager::IsValidMapCoord(mapid,x,y))
|
||||
if (!MapManager::IsValidMapCoord(mapid, x, y))
|
||||
{
|
||||
handler->PSendSysMessage(LANG_INVALID_TARGET_COORD,x,y,mapid);
|
||||
handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, x, y, mapid);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
@@ -260,7 +260,7 @@ public:
|
||||
Player* _player = handler->GetSession()->GetPlayer();
|
||||
|
||||
// number or [name] Shift-click form |color|Hgameobject:go_guid|h[name]|h|r
|
||||
char* cId = handler->extractKeyFromLink((char*)args,"Hgameobject");
|
||||
char* cId = handler->extractKeyFromLink((char*)args, "Hgameobject");
|
||||
if (!cId)
|
||||
return false;
|
||||
|
||||
@@ -287,9 +287,9 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!MapManager::IsValidMapCoord(mapid,x,y,z,ort))
|
||||
if (!MapManager::IsValidMapCoord(mapid, x, y, z, ort))
|
||||
{
|
||||
handler->PSendSysMessage(LANG_INVALID_TARGET_COORD,x,y,mapid);
|
||||
handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, x, y, mapid);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
@@ -314,7 +314,7 @@ public:
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
char* cNodeId = handler->extractKeyFromLink((char*)args,"Htaxinode");
|
||||
char* cNodeId = handler->extractKeyFromLink((char*)args, "Htaxinode");
|
||||
if (!cNodeId)
|
||||
return false;
|
||||
|
||||
@@ -325,15 +325,15 @@ public:
|
||||
TaxiNodesEntry const* node = sTaxiNodesStore.LookupEntry(i_nodeId);
|
||||
if (!node)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_COMMAND_GOTAXINODENOTFOUND,i_nodeId);
|
||||
handler->PSendSysMessage(LANG_COMMAND_GOTAXINODENOTFOUND, i_nodeId);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((node->x == 0.0f && node->y == 0.0f && node->z == 0.0f) ||
|
||||
!MapManager::IsValidMapCoord(node->map_id,node->x,node->y,node->z))
|
||||
!MapManager::IsValidMapCoord(node->map_id, node->x, node->y, node->z))
|
||||
{
|
||||
handler->PSendSysMessage(LANG_INVALID_TARGET_COORD,node->x,node->y,node->map_id);
|
||||
handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, node->x, node->y, node->map_id);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
@@ -370,14 +370,14 @@ public:
|
||||
AreaTriggerEntry const* at = sAreaTriggerStore.LookupEntry(i_atId);
|
||||
if (!at)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_COMMAND_GOAREATRNOTFOUND,i_atId);
|
||||
handler->PSendSysMessage(LANG_COMMAND_GOAREATRNOTFOUND, i_atId);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!MapManager::IsValidMapCoord(at->mapid,at->x,at->y,at->z))
|
||||
if (!MapManager::IsValidMapCoord(at->mapid, at->x, at->y, at->z))
|
||||
{
|
||||
handler->PSendSysMessage(LANG_INVALID_TARGET_COORD,at->x,at->y,at->mapid);
|
||||
handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, at->x, at->y, at->mapid);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
@@ -405,9 +405,9 @@ public:
|
||||
|
||||
char* px = strtok((char*)args, " ");
|
||||
char* py = strtok(NULL, " ");
|
||||
char* tail = strtok(NULL,"");
|
||||
char* tail = strtok(NULL, "");
|
||||
|
||||
char* cAreaId = handler->extractKeyFromLink(tail,"Harea"); // string or [name] Shift-click form |color|Harea:area_id|h[name]|h|r
|
||||
char* cAreaId = handler->extractKeyFromLink(tail, "Harea"); // string or [name] Shift-click form |color|Harea:area_id|h[name]|h|r
|
||||
|
||||
if (!px || !py)
|
||||
return false;
|
||||
@@ -425,7 +425,7 @@ public:
|
||||
|
||||
if (x < 0 || x > 100 || y < 0 || y > 100 || !areaEntry)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_INVALID_ZONE_COORD,x,y,areaid);
|
||||
handler->PSendSysMessage(LANG_INVALID_ZONE_COORD, x, y, areaid);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
@@ -437,16 +437,16 @@ public:
|
||||
|
||||
if (map->Instanceable())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_INVALID_ZONE_MAP,areaEntry->ID,areaEntry->area_name[handler->GetSessionDbcLocale()],map->GetId(),map->GetMapName());
|
||||
handler->PSendSysMessage(LANG_INVALID_ZONE_MAP, areaEntry->ID, areaEntry->area_name[handler->GetSessionDbcLocale()], map->GetId(), map->GetMapName());
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
Zone2MapCoordinates(x,y,zoneEntry->ID);
|
||||
Zone2MapCoordinates(x, y, zoneEntry->ID);
|
||||
|
||||
if (!MapManager::IsValidMapCoord(zoneEntry->mapid,x,y))
|
||||
if (!MapManager::IsValidMapCoord(zoneEntry->mapid, x, y))
|
||||
{
|
||||
handler->PSendSysMessage(LANG_INVALID_TARGET_COORD,x,y,zoneEntry->mapid);
|
||||
handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, x, y, zoneEntry->mapid);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
@@ -489,9 +489,9 @@ public:
|
||||
else
|
||||
mapid = _player->GetMapId();
|
||||
|
||||
if (!MapManager::IsValidMapCoord(mapid,x,y))
|
||||
if (!MapManager::IsValidMapCoord(mapid, x, y))
|
||||
{
|
||||
handler->PSendSysMessage(LANG_INVALID_TARGET_COORD,x,y,mapid);
|
||||
handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, x, y, mapid);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
@@ -538,9 +538,9 @@ public:
|
||||
else
|
||||
mapid = _player->GetMapId();
|
||||
|
||||
if (!MapManager::IsValidMapCoord(mapid,x,y,z))
|
||||
if (!MapManager::IsValidMapCoord(mapid, x, y, z))
|
||||
{
|
||||
handler->PSendSysMessage(LANG_INVALID_TARGET_COORD,x,y,mapid);
|
||||
handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, x, y, mapid);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public:
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
char* cId = handler->extractKeyFromLink((char*)args,"Hgameobject");
|
||||
char* cId = handler->extractKeyFromLink((char*)args, "Hgameobject");
|
||||
if (!cId)
|
||||
return false;
|
||||
|
||||
@@ -86,7 +86,7 @@ public:
|
||||
|
||||
// by DB guid
|
||||
if (GameObjectData const* go_data = sObjectMgr->GetGOData(lowguid))
|
||||
obj = handler->GetObjectGlobalyWithGuidOrNearWithDbGuid(lowguid,go_data->id);
|
||||
obj = handler->GetObjectGlobalyWithGuidOrNearWithDbGuid(lowguid, go_data->id);
|
||||
|
||||
if (!obj)
|
||||
{
|
||||
@@ -111,7 +111,7 @@ public:
|
||||
return false;
|
||||
|
||||
// number or [name] Shift-click form |color|Hgameobject_entry:go_id|h[name]|h|r
|
||||
char* cId = handler->extractKeyFromLink((char*)args,"Hgameobject_entry");
|
||||
char* cId = handler->extractKeyFromLink((char*)args, "Hgameobject_entry");
|
||||
if (!cId)
|
||||
return false;
|
||||
|
||||
@@ -125,7 +125,7 @@ public:
|
||||
|
||||
if (!gInfo)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_GAMEOBJECT_NOT_EXIST,id);
|
||||
handler->PSendSysMessage(LANG_GAMEOBJECT_NOT_EXIST, id);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
@@ -133,8 +133,8 @@ public:
|
||||
if (gInfo->displayId && !sGameObjectDisplayInfoStore.LookupEntry(gInfo->displayId))
|
||||
{
|
||||
// report to DB errors log as in loading case
|
||||
sLog->outErrorDb("Gameobject (Entry %u GoType: %u) have invalid displayId (%u), not spawned.",id, gInfo->type, gInfo->displayId);
|
||||
handler->PSendSysMessage(LANG_GAMEOBJECT_HAVE_INVALID_DATA,id);
|
||||
sLog->outErrorDb("Gameobject (Entry %u GoType: %u) have invalid displayId (%u), not spawned.", id, gInfo->type, gInfo->displayId);
|
||||
handler->PSendSysMessage(LANG_GAMEOBJECT_HAVE_INVALID_DATA, id);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
@@ -163,7 +163,7 @@ public:
|
||||
}
|
||||
|
||||
// fill the gameobject data and save to the db
|
||||
pGameObj->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()),chr->GetPhaseMaskForSpawn());
|
||||
pGameObj->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), chr->GetPhaseMaskForSpawn());
|
||||
|
||||
// this will generate a new guid if the object is in an instance
|
||||
if (!pGameObj->LoadFromDB(db_lowGUID, map))
|
||||
@@ -177,7 +177,7 @@ public:
|
||||
// TODO: is it really necessary to add both the real and DB table guid here ?
|
||||
sObjectMgr->AddGameobjectToGrid(db_lowGUID, sObjectMgr->GetGOData(db_lowGUID));
|
||||
|
||||
handler->PSendSysMessage(LANG_GAMEOBJECT_ADD,id,gInfo->name.c_str(),db_lowGUID,x,y,z);
|
||||
handler->PSendSysMessage(LANG_GAMEOBJECT_ADD, id, gInfo->name.c_str(), db_lowGUID, x, y, z);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -208,7 +208,7 @@ public:
|
||||
|
||||
uint32 id = atoi(charID);
|
||||
|
||||
chr->SummonGameObject(id,x,y,z,ang,0,0,rot2,rot3,spawntm);
|
||||
chr->SummonGameObject(id, x, y, z, ang, 0, 0, rot2, rot3, spawntm);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -221,7 +221,7 @@ public:
|
||||
if (*args)
|
||||
{
|
||||
// number or [name] Shift-click form |color|Hgameobject_entry:go_id|h[name]|h|r
|
||||
char* cId = handler->extractKeyFromLink((char*)args,"Hgameobject_entry");
|
||||
char* cId = handler->extractKeyFromLink((char*)args, "Hgameobject_entry");
|
||||
if (!cId)
|
||||
return false;
|
||||
|
||||
@@ -229,15 +229,15 @@ public:
|
||||
|
||||
if (id)
|
||||
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 WHERE map = '%i' AND id = '%u' ORDER BY order_ ASC LIMIT 1",
|
||||
pl->GetPositionX(), pl->GetPositionY(), pl->GetPositionZ(), pl->GetMapId(),id);
|
||||
pl->GetPositionX(), pl->GetPositionY(), pl->GetPositionZ(), pl->GetMapId(), id);
|
||||
else
|
||||
{
|
||||
std::string name = cId;
|
||||
WorldDatabase.escape_string(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",
|
||||
pl->GetPositionX(), pl->GetPositionY(), pl->GetPositionZ(), pl->GetMapId(),name.c_str());
|
||||
"FROM gameobject, gameobject_template WHERE gameobject_template.entry = gameobject.id AND map = %i AND name "_LIKE_" "_CONCAT3_("'%%'", "'%s'", "'%%'")" ORDER BY order_ ASC LIMIT 1",
|
||||
pl->GetPositionX(), pl->GetPositionY(), pl->GetPositionZ(), pl->GetMapId(), name.c_str());
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -254,7 +254,7 @@ public:
|
||||
initString =false;
|
||||
}
|
||||
else
|
||||
eventFilter << "," << *itr;
|
||||
eventFilter << ", " << *itr;
|
||||
}
|
||||
|
||||
if (!initString)
|
||||
@@ -266,7 +266,7 @@ public:
|
||||
"(POW(position_x - %f, 2) + POW(position_y - %f, 2) + POW(position_z - %f, 2)) AS order_ FROM gameobject "
|
||||
"LEFT OUTER JOIN game_event_gameobject on gameobject.guid = game_event_gameobject.guid WHERE map = '%i' %s ORDER BY order_ ASC LIMIT 10",
|
||||
handler->GetSession()->GetPlayer()->GetPositionX(), handler->GetSession()->GetPlayer()->GetPositionY(), handler->GetSession()->GetPlayer()->GetPositionZ(),
|
||||
handler->GetSession()->GetPlayer()->GetMapId(),eventFilter.str().c_str());
|
||||
handler->GetSession()->GetPlayer()->GetMapId(), eventFilter.str().c_str());
|
||||
}
|
||||
|
||||
if (!result)
|
||||
@@ -299,7 +299,7 @@ public:
|
||||
|
||||
if (!found)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_GAMEOBJECT_NOT_EXIST,id);
|
||||
handler->PSendSysMessage(LANG_GAMEOBJECT_NOT_EXIST, id);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -307,11 +307,11 @@ public:
|
||||
|
||||
if (!goI)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_GAMEOBJECT_NOT_EXIST,id);
|
||||
handler->PSendSysMessage(LANG_GAMEOBJECT_NOT_EXIST, id);
|
||||
return false;
|
||||
}
|
||||
|
||||
GameObject* target = handler->GetSession()->GetPlayer()->GetMap()->GetGameObject(MAKE_NEW_GUID(lowguid,id,HIGHGUID_GAMEOBJECT));
|
||||
GameObject* target = handler->GetSession()->GetPlayer()->GetMap()->GetGameObject(MAKE_NEW_GUID(lowguid, id, HIGHGUID_GAMEOBJECT));
|
||||
|
||||
handler->PSendSysMessage(LANG_GAMEOBJECT_DETAIL, lowguid, goI->name.c_str(), lowguid, id, x, y, z, mapid, o, phase);
|
||||
|
||||
@@ -321,10 +321,10 @@ public:
|
||||
if (curRespawnDelay < 0)
|
||||
curRespawnDelay = 0;
|
||||
|
||||
std::string curRespawnDelayStr = secsToTimeString(curRespawnDelay,true);
|
||||
std::string defRespawnDelayStr = secsToTimeString(target->GetRespawnDelay(),true);
|
||||
std::string curRespawnDelayStr = secsToTimeString(curRespawnDelay, true);
|
||||
std::string defRespawnDelayStr = secsToTimeString(target->GetRespawnDelay(), true);
|
||||
|
||||
handler->PSendSysMessage(LANG_COMMAND_RAWPAWNTIMES, defRespawnDelayStr.c_str(),curRespawnDelayStr.c_str());
|
||||
handler->PSendSysMessage(LANG_COMMAND_RAWPAWNTIMES, defRespawnDelayStr.c_str(), curRespawnDelayStr.c_str());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -333,7 +333,7 @@ public:
|
||||
static bool HandleGameObjectDeleteCommand(ChatHandler* handler, const char* args)
|
||||
{
|
||||
// number or [name] Shift-click form |color|Hgameobject:go_guid|h[name]|h|r
|
||||
char* cId = handler->extractKeyFromLink((char*)args,"Hgameobject");
|
||||
char* cId = handler->extractKeyFromLink((char*)args, "Hgameobject");
|
||||
if (!cId)
|
||||
return false;
|
||||
|
||||
@@ -345,7 +345,7 @@ public:
|
||||
|
||||
// by DB guid
|
||||
if (GameObjectData const* go_data = sObjectMgr->GetGOData(lowguid))
|
||||
obj = handler->GetObjectGlobalyWithGuidOrNearWithDbGuid(lowguid,go_data->id);
|
||||
obj = handler->GetObjectGlobalyWithGuidOrNearWithDbGuid(lowguid, go_data->id);
|
||||
|
||||
if (!obj)
|
||||
{
|
||||
@@ -357,7 +357,7 @@ public:
|
||||
uint64 owner_guid = obj->GetOwnerGUID();
|
||||
if (owner_guid)
|
||||
{
|
||||
Unit* owner = ObjectAccessor::GetUnit(*handler->GetSession()->GetPlayer(),owner_guid);
|
||||
Unit* owner = ObjectAccessor::GetUnit(*handler->GetSession()->GetPlayer(), owner_guid);
|
||||
if (!owner || !IS_PLAYER_GUID(owner_guid))
|
||||
{
|
||||
handler->PSendSysMessage(LANG_COMMAND_DELOBJREFERCREATURE, GUID_LOPART(owner_guid), obj->GetGUIDLow());
|
||||
@@ -365,7 +365,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
owner->RemoveGameObject(obj,false);
|
||||
owner->RemoveGameObject(obj, false);
|
||||
}
|
||||
|
||||
obj->SetRespawnTime(0); // not save respawn time
|
||||
@@ -381,7 +381,7 @@ public:
|
||||
static bool HandleGameObjectTurnCommand(ChatHandler* handler, const char* args)
|
||||
{
|
||||
// number or [name] Shift-click form |color|Hgameobject:go_id|h[name]|h|r
|
||||
char* cId = handler->extractKeyFromLink((char*)args,"Hgameobject");
|
||||
char* cId = handler->extractKeyFromLink((char*)args, "Hgameobject");
|
||||
if (!cId)
|
||||
return false;
|
||||
|
||||
@@ -393,7 +393,7 @@ public:
|
||||
|
||||
// by DB guid
|
||||
if (GameObjectData const* go_data = sObjectMgr->GetGOData(lowguid))
|
||||
obj = handler->GetObjectGlobalyWithGuidOrNearWithDbGuid(lowguid,go_data->id);
|
||||
obj = handler->GetObjectGlobalyWithGuidOrNearWithDbGuid(lowguid, go_data->id);
|
||||
|
||||
if (!obj)
|
||||
{
|
||||
@@ -432,7 +432,7 @@ public:
|
||||
static bool HandleGameObjectMoveCommand(ChatHandler* handler, const char* args)
|
||||
{
|
||||
// number or [name] Shift-click form |color|Hgameobject:go_guid|h[name]|h|r
|
||||
char* cId = handler->extractKeyFromLink((char*)args,"Hgameobject");
|
||||
char* cId = handler->extractKeyFromLink((char*)args, "Hgameobject");
|
||||
if (!cId)
|
||||
return false;
|
||||
|
||||
@@ -444,7 +444,7 @@ public:
|
||||
|
||||
// by DB guid
|
||||
if (GameObjectData const* go_data = sObjectMgr->GetGOData(lowguid))
|
||||
obj = handler->GetObjectGlobalyWithGuidOrNearWithDbGuid(lowguid,go_data->id);
|
||||
obj = handler->GetObjectGlobalyWithGuidOrNearWithDbGuid(lowguid, go_data->id);
|
||||
|
||||
if (!obj)
|
||||
{
|
||||
@@ -473,9 +473,9 @@ public:
|
||||
float y = (float)atof(py);
|
||||
float z = (float)atof(pz);
|
||||
|
||||
if (!MapManager::IsValidMapCoord(obj->GetMapId(),x,y,z))
|
||||
if (!MapManager::IsValidMapCoord(obj->GetMapId(), x, y, z))
|
||||
{
|
||||
handler->PSendSysMessage(LANG_INVALID_TARGET_COORD,x,y,obj->GetMapId());
|
||||
handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, x, y, obj->GetMapId());
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
@@ -497,7 +497,7 @@ public:
|
||||
static bool HandleGameObjectSetPhaseCommand(ChatHandler* handler, const char* args)
|
||||
{
|
||||
// number or [name] Shift-click form |color|Hgameobject:go_id|h[name]|h|r
|
||||
char* cId = handler->extractKeyFromLink((char*)args,"Hgameobject");
|
||||
char* cId = handler->extractKeyFromLink((char*)args, "Hgameobject");
|
||||
if (!cId)
|
||||
return false;
|
||||
|
||||
@@ -509,7 +509,7 @@ public:
|
||||
|
||||
// by DB guid
|
||||
if (GameObjectData const* go_data = sObjectMgr->GetGOData(lowguid))
|
||||
obj = handler->GetObjectGlobalyWithGuidOrNearWithDbGuid(lowguid,go_data->id);
|
||||
obj = handler->GetObjectGlobalyWithGuidOrNearWithDbGuid(lowguid, go_data->id);
|
||||
|
||||
if (!obj)
|
||||
{
|
||||
@@ -527,7 +527,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
obj->SetPhaseMask(phasemask,true);
|
||||
obj->SetPhaseMask(phasemask, true);
|
||||
obj->SaveToDB();
|
||||
return true;
|
||||
}
|
||||
@@ -542,7 +542,7 @@ public:
|
||||
"(POW(position_x - '%f', 2) + POW(position_y - '%f', 2) + POW(position_z - '%f', 2)) AS order_ "
|
||||
"FROM gameobject WHERE map='%u' AND (POW(position_x - '%f', 2) + POW(position_y - '%f', 2) + POW(position_z - '%f', 2)) <= '%f' ORDER BY order_",
|
||||
pl->GetPositionX(), pl->GetPositionY(), pl->GetPositionZ(),
|
||||
pl->GetMapId(),pl->GetPositionX(), pl->GetPositionY(), pl->GetPositionZ(),distance*distance);
|
||||
pl->GetMapId(), pl->GetPositionX(), pl->GetPositionY(), pl->GetPositionZ(), distance*distance);
|
||||
|
||||
if (result)
|
||||
{
|
||||
@@ -567,7 +567,7 @@ public:
|
||||
} while (result->NextRow());
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(LANG_COMMAND_NEAROBJMESSAGE,distance,count);
|
||||
handler->PSendSysMessage(LANG_COMMAND_NEAROBJMESSAGE, distance, count);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -659,7 +659,7 @@ public:
|
||||
gobj->SetByteValue(GAMEOBJECT_BYTES_1, type, state);
|
||||
else if (type == 4)
|
||||
{
|
||||
WorldPacket data(SMSG_GAMEOBJECT_CUSTOM_ANIM,8+4);
|
||||
WorldPacket data(SMSG_GAMEOBJECT_CUSTOM_ANIM, 8+4);
|
||||
data << gobj->GetGUID();
|
||||
data << (uint32)(state);
|
||||
gobj->SendMessageToSet(&data, true);
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
static ChatCommand learnAllMyCommandTable[] =
|
||||
{
|
||||
{ "class", SEC_ADMINISTRATOR, false, &HandleLearnAllMyClassCommand, "", NULL },
|
||||
{ "pettalents", SEC_ADMINISTRATOR, false, &HandleLearnAllMyPetTalentsCommand,"", NULL },
|
||||
{ "pettalents", SEC_ADMINISTRATOR, false, &HandleLearnAllMyPetTalentsCommand, "", NULL },
|
||||
{ "spells", SEC_ADMINISTRATOR, false, &HandleLearnAllMySpellsCommand, "", NULL },
|
||||
{ "talents", SEC_ADMINISTRATOR, false, &HandleLearnAllMyTalentsCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
@@ -83,13 +83,13 @@ public:
|
||||
if (!spell || !sSpellStore.LookupEntry(spell))
|
||||
return false;
|
||||
|
||||
char const* allStr = strtok(NULL," ");
|
||||
char const* allStr = strtok(NULL, " ");
|
||||
bool allRanks = allStr ? (strncmp(allStr, "all", strlen(allStr)) == 0) : false;
|
||||
|
||||
SpellEntry const* spellInfo = sSpellStore.LookupEntry(spell);
|
||||
if (!spellInfo || !SpellMgr::IsSpellValid(spellInfo,handler->GetSession()->GetPlayer()))
|
||||
if (!spellInfo || !SpellMgr::IsSpellValid(spellInfo, handler->GetSession()->GetPlayer()))
|
||||
{
|
||||
handler->PSendSysMessage(LANG_COMMAND_SPELL_BROKEN,spell);
|
||||
handler->PSendSysMessage(LANG_COMMAND_SPELL_BROKEN, spell);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
@@ -99,7 +99,7 @@ public:
|
||||
if (targetPlayer == handler->GetSession()->GetPlayer())
|
||||
handler->SendSysMessage(LANG_YOU_KNOWN_SPELL);
|
||||
else
|
||||
handler->PSendSysMessage(LANG_TARGET_KNOWN_SPELL,handler->GetNameLink(targetPlayer).c_str());
|
||||
handler->PSendSysMessage(LANG_TARGET_KNOWN_SPELL, handler->GetNameLink(targetPlayer).c_str());
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
@@ -172,7 +172,7 @@ public:
|
||||
continue;
|
||||
|
||||
// skip broken spells
|
||||
if (!SpellMgr::IsSpellValid(spellInfo,handler->GetSession()->GetPlayer(),false))
|
||||
if (!SpellMgr::IsSpellValid(spellInfo, handler->GetSession()->GetPlayer(), false))
|
||||
continue;
|
||||
|
||||
handler->GetSession()->GetPlayer()->learnSpell(i, false);
|
||||
@@ -215,7 +215,7 @@ public:
|
||||
continue;
|
||||
|
||||
SpellEntry const* spellInfo = sSpellStore.LookupEntry(spellId);
|
||||
if (!spellInfo || !SpellMgr::IsSpellValid(spellInfo,handler->GetSession()->GetPlayer(),false))
|
||||
if (!spellInfo || !SpellMgr::IsSpellValid(spellInfo, handler->GetSession()->GetPlayer(), false))
|
||||
continue;
|
||||
|
||||
// learn highest rank of talent and learn all non-talent spell ranks (recursive by tree)
|
||||
@@ -294,7 +294,7 @@ public:
|
||||
continue;
|
||||
|
||||
SpellEntry const* spellInfo = sSpellStore.LookupEntry(spellid);
|
||||
if (!spellInfo || !SpellMgr::IsSpellValid(spellInfo,handler->GetSession()->GetPlayer(),false))
|
||||
if (!spellInfo || !SpellMgr::IsSpellValid(spellInfo, handler->GetSession()->GetPlayer(), false))
|
||||
continue;
|
||||
|
||||
// learn highest rank of talent and learn all non-talent spell ranks (recursive by tree)
|
||||
@@ -320,13 +320,13 @@ public:
|
||||
static bool HandleLearnAllDefaultCommand(ChatHandler* handler, const char* args)
|
||||
{
|
||||
Player* target;
|
||||
if (!handler->extractPlayerTarget((char*)args,&target))
|
||||
if (!handler->extractPlayerTarget((char*)args, &target))
|
||||
return false;
|
||||
|
||||
target->learnDefaultSpells();
|
||||
target->learnQuestRewardedSpells();
|
||||
|
||||
handler->PSendSysMessage(LANG_COMMAND_LEARN_ALL_DEFAULT_AND_QUEST,handler->GetNameLink(target).c_str());
|
||||
handler->PSendSysMessage(LANG_COMMAND_LEARN_ALL_DEFAULT_AND_QUEST, handler->GetNameLink(target).c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -342,7 +342,7 @@ public:
|
||||
if ((skillInfo->categoryId == SKILL_CATEGORY_PROFESSION || skillInfo->categoryId == SKILL_CATEGORY_SECONDARY) &&
|
||||
skillInfo->canLink) // only prof. with recipes have
|
||||
{
|
||||
HandleLearnSkillRecipesHelper(handler->GetSession()->GetPlayer(),skillInfo->id);
|
||||
HandleLearnSkillRecipesHelper(handler->GetSession()->GetPlayer(), skillInfo->id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -367,7 +367,7 @@ public:
|
||||
|
||||
std::wstring wnamepart;
|
||||
|
||||
if (!Utf8toWStr(args,wnamepart))
|
||||
if (!Utf8toWStr(args, wnamepart))
|
||||
return false;
|
||||
|
||||
// converting string that we try to find to lower case
|
||||
@@ -419,14 +419,14 @@ public:
|
||||
if (!targetSkillInfo)
|
||||
return false;
|
||||
|
||||
HandleLearnSkillRecipesHelper(target,targetSkillInfo->id);
|
||||
HandleLearnSkillRecipesHelper(target, targetSkillInfo->id);
|
||||
|
||||
uint16 maxLevel = target->GetPureMaxSkillValue(targetSkillInfo->id);
|
||||
target->SetSkill(targetSkillInfo->id, target->GetSkillStep(targetSkillInfo->id), maxLevel, maxLevel);
|
||||
handler->PSendSysMessage(LANG_COMMAND_LEARN_ALL_RECIPES, name.c_str());
|
||||
return true;
|
||||
}
|
||||
static void HandleLearnSkillRecipesHelper(Player* player,uint32 skill_id)
|
||||
static void HandleLearnSkillRecipesHelper(Player* player, uint32 skill_id)
|
||||
{
|
||||
uint32 classmask = player->getClassMask();
|
||||
|
||||
@@ -453,7 +453,7 @@ public:
|
||||
continue;
|
||||
|
||||
SpellEntry const* spellInfo = sSpellStore.LookupEntry(skillLine->spellId);
|
||||
if (!spellInfo || !SpellMgr::IsSpellValid(spellInfo,player,false))
|
||||
if (!spellInfo || !SpellMgr::IsSpellValid(spellInfo, player, false))
|
||||
continue;
|
||||
|
||||
player->learnSpell(skillLine->spellId, false);
|
||||
|
||||
@@ -139,7 +139,7 @@ public:
|
||||
if (handler->needReportToTarget(target))
|
||||
(ChatHandler(target)).PSendSysMessage(LANG_YOURS_MANA_CHANGED, handler->GetNameLink().c_str(), mana, manam);
|
||||
|
||||
target->SetMaxPower(POWER_MANA,manam);
|
||||
target->SetMaxPower(POWER_MANA, manam);
|
||||
target->SetPower(POWER_MANA, mana);
|
||||
|
||||
return true;
|
||||
@@ -188,10 +188,10 @@ public:
|
||||
if (handler->needReportToTarget(target))
|
||||
(ChatHandler(target)).PSendSysMessage(LANG_YOURS_ENERGY_CHANGED, handler->GetNameLink().c_str(), energy/10, energym/10);
|
||||
|
||||
target->SetMaxPower(POWER_ENERGY,energym);
|
||||
target->SetMaxPower(POWER_ENERGY, energym);
|
||||
target->SetPower(POWER_ENERGY, energy);
|
||||
|
||||
sLog->outDetail(handler->GetTrinityString(LANG_CURRENT_ENERGY),target->GetMaxPower(POWER_ENERGY));
|
||||
sLog->outDetail(handler->GetTrinityString(LANG_CURRENT_ENERGY), target->GetMaxPower(POWER_ENERGY));
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -239,7 +239,7 @@ public:
|
||||
if (handler->needReportToTarget(target))
|
||||
(ChatHandler(target)).PSendSysMessage(LANG_YOURS_RAGE_CHANGED, handler->GetNameLink().c_str(), rage/10, ragem/10);
|
||||
|
||||
target->SetMaxPower(POWER_RAGE,ragem);
|
||||
target->SetMaxPower(POWER_RAGE, ragem);
|
||||
target->SetPower(POWER_RAGE, rage);
|
||||
|
||||
return true;
|
||||
@@ -273,7 +273,7 @@ public:
|
||||
if (handler->needReportToTarget(target))
|
||||
(ChatHandler(target)).PSendSysMessage(LANG_YOURS_RUNIC_POWER_CHANGED, handler->GetNameLink().c_str(), rune/10, runem/10);
|
||||
|
||||
target->SetMaxPower(POWER_RUNIC_POWER,runem);
|
||||
target->SetMaxPower(POWER_RUNIC_POWER, runem);
|
||||
target->SetPower(POWER_RUNIC_POWER, rune);
|
||||
|
||||
return true;
|
||||
@@ -285,7 +285,7 @@ public:
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
char* pfactionid = handler->extractKeyFromLink((char*)args,"Hfaction");
|
||||
char* pfactionid = handler->extractKeyFromLink((char*)args, "Hfaction");
|
||||
|
||||
Creature* target = handler->getSelectedCreature();
|
||||
if (!target)
|
||||
@@ -303,7 +303,7 @@ public:
|
||||
uint32 flag = target->GetUInt32Value(UNIT_FIELD_FLAGS);
|
||||
uint32 npcflag = target->GetUInt32Value(UNIT_NPC_FLAGS);
|
||||
uint32 dyflag = target->GetUInt32Value(UNIT_DYNAMIC_FLAGS);
|
||||
handler->PSendSysMessage(LANG_CURRENT_FACTION,target->GetGUIDLow(),factionid,flag,npcflag,dyflag);
|
||||
handler->PSendSysMessage(LANG_CURRENT_FACTION, target->GetGUIDLow(), factionid, flag, npcflag, dyflag);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -347,12 +347,12 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_FACTION, target->GetGUIDLow(),factionid,flag,npcflag,dyflag);
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_FACTION, target->GetGUIDLow(), factionid, flag, npcflag, dyflag);
|
||||
|
||||
target->setFaction(factionid);
|
||||
target->SetUInt32Value(UNIT_FIELD_FLAGS,flag);
|
||||
target->SetUInt32Value(UNIT_NPC_FLAGS,npcflag);
|
||||
target->SetUInt32Value(UNIT_DYNAMIC_FLAGS,dyflag);
|
||||
target->SetUInt32Value(UNIT_FIELD_FLAGS, flag);
|
||||
target->SetUInt32Value(UNIT_NPC_FLAGS, npcflag);
|
||||
target->SetUInt32Value(UNIT_DYNAMIC_FLAGS, dyflag);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -488,7 +488,7 @@ public:
|
||||
|
||||
if (target->isInFlight())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_CHAR_IN_FLIGHT,targetNameLink.c_str());
|
||||
handler->PSendSysMessage(LANG_CHAR_IN_FLIGHT, targetNameLink.c_str());
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
@@ -497,11 +497,11 @@ public:
|
||||
if (handler->needReportToTarget(target))
|
||||
(ChatHandler(target)).PSendSysMessage(LANG_YOURS_ASPEED_CHANGED, handler->GetNameLink().c_str(), ASpeed);
|
||||
|
||||
target->SetSpeed(MOVE_WALK, ASpeed,true);
|
||||
target->SetSpeed(MOVE_RUN, ASpeed,true);
|
||||
target->SetSpeed(MOVE_SWIM, ASpeed,true);
|
||||
//target->SetSpeed(MOVE_TURN, ASpeed,true);
|
||||
target->SetSpeed(MOVE_FLIGHT, ASpeed,true);
|
||||
target->SetSpeed(MOVE_WALK, ASpeed, true);
|
||||
target->SetSpeed(MOVE_RUN, ASpeed, true);
|
||||
target->SetSpeed(MOVE_SWIM, ASpeed, true);
|
||||
//target->SetSpeed(MOVE_TURN, ASpeed, true);
|
||||
target->SetSpeed(MOVE_FLIGHT, ASpeed, true);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -536,7 +536,7 @@ public:
|
||||
|
||||
if (target->isInFlight())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_CHAR_IN_FLIGHT,targetNameLink.c_str());
|
||||
handler->PSendSysMessage(LANG_CHAR_IN_FLIGHT, targetNameLink.c_str());
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
@@ -545,7 +545,7 @@ public:
|
||||
if (handler->needReportToTarget(target))
|
||||
(ChatHandler(target)).PSendSysMessage(LANG_YOURS_SPEED_CHANGED, handler->GetNameLink().c_str(), Speed);
|
||||
|
||||
target->SetSpeed(MOVE_RUN,Speed,true);
|
||||
target->SetSpeed(MOVE_RUN, Speed, true);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -581,7 +581,7 @@ public:
|
||||
|
||||
if (target->isInFlight())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_CHAR_IN_FLIGHT,targetNameLink.c_str());
|
||||
handler->PSendSysMessage(LANG_CHAR_IN_FLIGHT, targetNameLink.c_str());
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
@@ -590,7 +590,7 @@ public:
|
||||
if (handler->needReportToTarget(target))
|
||||
(ChatHandler(target)).PSendSysMessage(LANG_YOURS_SWIM_SPEED_CHANGED, handler->GetNameLink().c_str(), Swim);
|
||||
|
||||
target->SetSpeed(MOVE_SWIM,Swim,true);
|
||||
target->SetSpeed(MOVE_SWIM, Swim, true);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -626,7 +626,7 @@ public:
|
||||
|
||||
if (target->isInFlight())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_CHAR_IN_FLIGHT,targetNameLink.c_str());
|
||||
handler->PSendSysMessage(LANG_CHAR_IN_FLIGHT, targetNameLink.c_str());
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
@@ -635,7 +635,7 @@ public:
|
||||
if (handler->needReportToTarget(target))
|
||||
(ChatHandler(target)).PSendSysMessage(LANG_YOURS_BACK_SPEED_CHANGED, handler->GetNameLink().c_str(), BSpeed);
|
||||
|
||||
target->SetSpeed(MOVE_RUN_BACK,BSpeed,true);
|
||||
target->SetSpeed(MOVE_RUN_BACK, BSpeed, true);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -671,7 +671,7 @@ public:
|
||||
if (handler->needReportToTarget(target))
|
||||
(ChatHandler(target)).PSendSysMessage(LANG_YOURS_FLY_SPEED_CHANGED, handler->GetNameLink().c_str(), FSpeed);
|
||||
|
||||
target->SetSpeed(MOVE_FLIGHT,FSpeed,true);
|
||||
target->SetSpeed(MOVE_FLIGHT, FSpeed, true);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1148,7 +1148,7 @@ public:
|
||||
if (handler->HasLowerSecurity(target, 0))
|
||||
return false;
|
||||
|
||||
char* factionTxt = handler->extractKeyFromLink((char*)args,"Hfaction");
|
||||
char* factionTxt = handler->extractKeyFromLink((char*)args, "Hfaction");
|
||||
if (!factionTxt)
|
||||
return false;
|
||||
|
||||
@@ -1164,7 +1164,7 @@ public:
|
||||
{
|
||||
std::string rankStr = rankTxt;
|
||||
std::wstring wrankStr;
|
||||
if (!Utf8toWStr(rankStr,wrankStr))
|
||||
if (!Utf8toWStr(rankStr, wrankStr))
|
||||
return false;
|
||||
wstrToLower(wrankStr);
|
||||
|
||||
@@ -1177,12 +1177,12 @@ public:
|
||||
continue;
|
||||
|
||||
std::wstring wrank;
|
||||
if (!Utf8toWStr(rank,wrank))
|
||||
if (!Utf8toWStr(rank, wrank))
|
||||
continue;
|
||||
|
||||
wstrToLower(wrank);
|
||||
|
||||
if (wrank.substr(0,wrankStr.size()) == wrankStr)
|
||||
if (wrank.substr(0, wrankStr.size()) == wrankStr)
|
||||
{
|
||||
char *deltaTxt = strtok(NULL, " ");
|
||||
if (deltaTxt)
|
||||
@@ -1224,7 +1224,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
target->GetReputationMgr().SetReputation(factionEntry,amount);
|
||||
target->GetReputationMgr().SetReputation(factionEntry, amount);
|
||||
handler->PSendSysMessage(LANG_COMMAND_MODIFY_REP, factionEntry->name[handler->GetSessionDbcLocale()], factionId,
|
||||
handler->GetNameLink(target).c_str(), target->GetReputationMgr().GetReputation(factionEntry));
|
||||
return true;
|
||||
@@ -1267,7 +1267,7 @@ public:
|
||||
else if (target->GetTypeId() == TYPEID_PLAYER && handler->HasLowerSecurity(target->ToPlayer(), 0))
|
||||
return false;
|
||||
|
||||
target->SetPhaseMask(phasemask,true);
|
||||
target->SetPhaseMask(phasemask, true);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ public:
|
||||
{
|
||||
if (!*args)
|
||||
return false;
|
||||
char* charID = handler->extractKeyFromLink((char*)args,"Hcreature_entry");
|
||||
char* charID = handler->extractKeyFromLink((char*)args, "Hcreature_entry");
|
||||
if (!charID)
|
||||
return false;
|
||||
|
||||
@@ -161,7 +161,7 @@ public:
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
char* pitem = handler->extractKeyFromLink((char*)args,"Hitem");
|
||||
char* pitem = handler->extractKeyFromLink((char*)args, "Hitem");
|
||||
if (!pitem)
|
||||
{
|
||||
handler->SendSysMessage(LANG_COMMAND_NEEDITEMSEND);
|
||||
@@ -193,17 +193,17 @@ public:
|
||||
|
||||
uint32 vendor_entry = vendor ? vendor->GetEntry() : 0;
|
||||
|
||||
if (!sObjectMgr->IsVendorItemValid(vendor_entry,itemId,maxcount,incrtime,extendedcost,handler->GetSession()->GetPlayer()))
|
||||
if (!sObjectMgr->IsVendorItemValid(vendor_entry, itemId, maxcount, incrtime, extendedcost, handler->GetSession()->GetPlayer()))
|
||||
{
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
sObjectMgr->AddVendorItem(vendor_entry,itemId,maxcount,incrtime,extendedcost);
|
||||
sObjectMgr->AddVendorItem(vendor_entry, itemId, maxcount, incrtime, extendedcost);
|
||||
|
||||
ItemTemplate const* itemTemplate = sObjectMgr->GetItemTemplate(itemId);
|
||||
|
||||
handler->PSendSysMessage(LANG_ITEM_ADDED_TO_LIST,itemId,itemTemplate->Name1.c_str(), maxcount,incrtime,extendedcost);
|
||||
handler->PSendSysMessage(LANG_ITEM_ADDED_TO_LIST, itemId, itemTemplate->Name1.c_str(), maxcount, incrtime, extendedcost);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -222,7 +222,7 @@ public:
|
||||
|
||||
/* FIXME: impossible without entry
|
||||
if (lowguid)
|
||||
pCreature = ObjectAccessor::GetCreature(*handler->GetSession()->GetPlayer(),MAKE_GUID(lowguid,HIGHGUID_UNIT));
|
||||
pCreature = ObjectAccessor::GetCreature(*handler->GetSession()->GetPlayer(), MAKE_GUID(lowguid, HIGHGUID_UNIT));
|
||||
*/
|
||||
|
||||
// attempt check creature existence by DB data
|
||||
@@ -252,7 +252,7 @@ public:
|
||||
//WaypointMgr.AddLastNode(lowguid, player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetOrientation(), wait, 0);
|
||||
|
||||
// update movement type
|
||||
WorldDatabase.PExecute("UPDATE creature SET MovementType = '%u' WHERE guid = '%u'", WAYPOINT_MOTION_TYPE,lowguid);
|
||||
WorldDatabase.PExecute("UPDATE creature SET MovementType = '%u' WHERE guid = '%u'", WAYPOINT_MOTION_TYPE, lowguid);
|
||||
if (pCreature && pCreature->GetWaypointPath())
|
||||
{
|
||||
pCreature->SetDefaultMovementType(WAYPOINT_MOTION_TYPE);
|
||||
@@ -358,7 +358,7 @@ public:
|
||||
if (*args)
|
||||
{
|
||||
// number or [name] Shift-click form |color|Hcreature:creature_guid|h[name]|h|r
|
||||
char* cId = handler->extractKeyFromLink((char*)args,"Hcreature");
|
||||
char* cId = handler->extractKeyFromLink((char*)args, "Hcreature");
|
||||
if (!cId)
|
||||
return false;
|
||||
|
||||
@@ -403,7 +403,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
char* pitem = handler->extractKeyFromLink((char*)args,"Hitem");
|
||||
char* pitem = handler->extractKeyFromLink((char*)args, "Hitem");
|
||||
if (!pitem)
|
||||
{
|
||||
handler->SendSysMessage(LANG_COMMAND_NEEDITEMSEND);
|
||||
@@ -412,16 +412,16 @@ public:
|
||||
}
|
||||
uint32 itemId = atol(pitem);
|
||||
|
||||
if (!sObjectMgr->RemoveVendorItem(vendor->GetEntry(),itemId))
|
||||
if (!sObjectMgr->RemoveVendorItem(vendor->GetEntry(), itemId))
|
||||
{
|
||||
handler->PSendSysMessage(LANG_ITEM_NOT_IN_LIST,itemId);
|
||||
handler->PSendSysMessage(LANG_ITEM_NOT_IN_LIST, itemId);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
ItemTemplate const* itemTemplate = sObjectMgr->GetItemTemplate(itemId);
|
||||
|
||||
handler->PSendSysMessage(LANG_ITEM_DELETED_FROM_LIST,itemId,itemTemplate->Name1.c_str());
|
||||
handler->PSendSysMessage(LANG_ITEM_DELETED_FROM_LIST, itemId, itemTemplate->Name1.c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -533,19 +533,19 @@ public:
|
||||
int64 curRespawnDelay = target->GetRespawnTimeEx()-time(NULL);
|
||||
if (curRespawnDelay < 0)
|
||||
curRespawnDelay = 0;
|
||||
std::string curRespawnDelayStr = secsToTimeString(uint64(curRespawnDelay),true);
|
||||
std::string defRespawnDelayStr = secsToTimeString(target->GetRespawnDelay(),true);
|
||||
std::string curRespawnDelayStr = secsToTimeString(uint64(curRespawnDelay), true);
|
||||
std::string defRespawnDelayStr = secsToTimeString(target->GetRespawnDelay(), true);
|
||||
|
||||
handler->PSendSysMessage(LANG_NPCINFO_CHAR, target->GetDBTableGUIDLow(), target->GetGUIDLow(), faction, npcflags, Entry, displayid, nativeid);
|
||||
handler->PSendSysMessage(LANG_NPCINFO_LEVEL, target->getLevel());
|
||||
handler->PSendSysMessage(LANG_NPCINFO_HEALTH,target->GetCreateHealth(), target->GetMaxHealth(), target->GetHealth());
|
||||
handler->PSendSysMessage(LANG_NPCINFO_HEALTH, target->GetCreateHealth(), target->GetMaxHealth(), target->GetHealth());
|
||||
handler->PSendSysMessage(LANG_NPCINFO_FLAGS, target->GetUInt32Value(UNIT_FIELD_FLAGS), target->GetUInt32Value(UNIT_DYNAMIC_FLAGS), target->getFaction());
|
||||
handler->PSendSysMessage(LANG_COMMAND_RAWPAWNTIMES, defRespawnDelayStr.c_str(),curRespawnDelayStr.c_str());
|
||||
handler->PSendSysMessage(LANG_NPCINFO_LOOT, cInfo->lootid,cInfo->pickpocketLootId,cInfo->SkinLootId);
|
||||
handler->PSendSysMessage(LANG_COMMAND_RAWPAWNTIMES, defRespawnDelayStr.c_str(), curRespawnDelayStr.c_str());
|
||||
handler->PSendSysMessage(LANG_NPCINFO_LOOT, cInfo->lootid, cInfo->pickpocketLootId, cInfo->SkinLootId);
|
||||
handler->PSendSysMessage(LANG_NPCINFO_DUNGEON_ID, target->GetInstanceId());
|
||||
handler->PSendSysMessage(LANG_NPCINFO_PHASEMASK, target->GetPhaseMask());
|
||||
handler->PSendSysMessage(LANG_NPCINFO_ARMOR, target->GetArmor());
|
||||
handler->PSendSysMessage(LANG_NPCINFO_POSITION,float(target->GetPositionX()), float(target->GetPositionY()), float(target->GetPositionZ()));
|
||||
handler->PSendSysMessage(LANG_NPCINFO_POSITION, float(target->GetPositionX()), float(target->GetPositionY()), float(target->GetPositionZ()));
|
||||
|
||||
if ((npcflags & UNIT_NPC_FLAG_VENDOR))
|
||||
{
|
||||
@@ -569,7 +569,7 @@ public:
|
||||
if (!pCreature)
|
||||
{
|
||||
// number or [name] Shift-click form |color|Hcreature:creature_guid|h[name]|h|r
|
||||
char* cId = handler->extractKeyFromLink((char*)args,"Hcreature");
|
||||
char* cId = handler->extractKeyFromLink((char*)args, "Hcreature");
|
||||
if (!cId)
|
||||
return false;
|
||||
|
||||
@@ -577,7 +577,7 @@ public:
|
||||
|
||||
/* FIXME: impossible without entry
|
||||
if (lowguid)
|
||||
pCreature = ObjectAccessor::GetCreature(*handler->GetSession()->GetPlayer(),MAKE_GUID(lowguid,HIGHGUID_UNIT));
|
||||
pCreature = ObjectAccessor::GetCreature(*handler->GetSession()->GetPlayer(), MAKE_GUID(lowguid, HIGHGUID_UNIT));
|
||||
*/
|
||||
|
||||
// Attempting creature load from DB data
|
||||
@@ -624,7 +624,7 @@ public:
|
||||
const_cast<CreatureData*>(data)->posZ = z;
|
||||
const_cast<CreatureData*>(data)->orientation = o;
|
||||
}
|
||||
pCreature->GetMap()->CreatureRelocation(pCreature,x, y, z,o);
|
||||
pCreature->GetMap()->CreatureRelocation(pCreature, x, y, z, o);
|
||||
pCreature->GetMotionMaster()->Initialize();
|
||||
if (pCreature->isAlive()) // dead creature will reset movement generator at respawn
|
||||
{
|
||||
@@ -655,7 +655,7 @@ public:
|
||||
if (target->GetGUIDTransport())
|
||||
WorldDatabase.PQuery("UPDATE creature_transport SET emote=%u WHERE transport_entry=%u AND guid=%u", emote, target->GetTransport()->GetEntry(), target->GetGUIDTransport());
|
||||
|
||||
target->SetUInt32Value(UNIT_NPC_EMOTESTATE,emote);
|
||||
target->SetUInt32Value(UNIT_NPC_EMOTESTATE, emote);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -764,7 +764,7 @@ public:
|
||||
|
||||
/* impossible without entry
|
||||
if (lowguid)
|
||||
pCreature = ObjectAccessor::GetCreature(*handler->GetSession()->GetPlayer(),MAKE_GUID(lowguid,HIGHGUID_UNIT));
|
||||
pCreature = ObjectAccessor::GetCreature(*handler->GetSession()->GetPlayer(), MAKE_GUID(lowguid, HIGHGUID_UNIT));
|
||||
*/
|
||||
|
||||
// attempt check creature existence by DB data
|
||||
@@ -821,11 +821,11 @@ public:
|
||||
}
|
||||
if (doNotDelete == false)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_MOVE_TYPE_SET,type_str);
|
||||
handler->PSendSysMessage(LANG_MOVE_TYPE_SET, type_str);
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_MOVE_TYPE_SET_NODEL,type_str);
|
||||
handler->PSendSysMessage(LANG_MOVE_TYPE_SET_NODEL, type_str);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -854,7 +854,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
pCreature->SetPhaseMask(phasemask,true);
|
||||
pCreature->SetPhaseMask(phasemask, true);
|
||||
|
||||
if (!pCreature->isPet())
|
||||
pCreature->SaveToDB();
|
||||
@@ -896,8 +896,8 @@ public:
|
||||
pCreature->Respawn();
|
||||
}
|
||||
|
||||
WorldDatabase.PExecute("UPDATE creature SET spawndist=%f, MovementType=%i WHERE guid=%u",option,mtype,u_guidlow);
|
||||
handler->PSendSysMessage(LANG_COMMAND_SPAWNDIST,option);
|
||||
WorldDatabase.PExecute("UPDATE creature SET spawndist=%f, MovementType=%i WHERE guid=%u", option, mtype, u_guidlow);
|
||||
handler->PSendSysMessage(LANG_COMMAND_SPAWNDIST, option);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -929,9 +929,9 @@ public:
|
||||
else
|
||||
return false;
|
||||
|
||||
WorldDatabase.PExecute("UPDATE creature SET spawntimesecs=%i WHERE guid=%u",i_stime,u_guidlow);
|
||||
WorldDatabase.PExecute("UPDATE creature SET spawntimesecs=%i WHERE guid=%u", i_stime, u_guidlow);
|
||||
pCreature->SetRespawnDelay((uint32)i_stime);
|
||||
handler->PSendSysMessage(LANG_COMMAND_SPAWNTIME,i_stime);
|
||||
handler->PSendSysMessage(LANG_COMMAND_SPAWNTIME, i_stime);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1044,7 +1044,7 @@ public:
|
||||
if (handler->HasLowerSecurity(sObjectMgr->GetPlayer(receiver_guid), 0))
|
||||
return false;
|
||||
|
||||
pCreature->MonsterWhisper(text,receiver_guid);
|
||||
pCreature->MonsterWhisper(text, receiver_guid);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1114,7 +1114,7 @@ public:
|
||||
|
||||
if (!cInfo->isTameable (player->CanTameExoticPets()))
|
||||
{
|
||||
handler->PSendSysMessage (LANG_CREATURE_NON_TAMEABLE,cInfo->Entry);
|
||||
handler->PSendSysMessage (LANG_CREATURE_NON_TAMEABLE, cInfo->Entry);
|
||||
handler->SetSentErrorMessage (true);
|
||||
return false;
|
||||
}
|
||||
@@ -1123,15 +1123,15 @@ public:
|
||||
Pet* pet = player->CreateTamedPetFrom (creatureTarget);
|
||||
if (!pet)
|
||||
{
|
||||
handler->PSendSysMessage (LANG_CREATURE_NON_TAMEABLE,cInfo->Entry);
|
||||
handler->PSendSysMessage (LANG_CREATURE_NON_TAMEABLE, cInfo->Entry);
|
||||
handler->SetSentErrorMessage (true);
|
||||
return false;
|
||||
}
|
||||
|
||||
// place pet before player
|
||||
float x,y,z;
|
||||
player->GetClosePoint (x,y,z,creatureTarget->GetObjectSize (),CONTACT_DISTANCE);
|
||||
pet->Relocate (x,y,z,M_PI-player->GetOrientation ());
|
||||
float x, y, z;
|
||||
player->GetClosePoint (x, y, z, creatureTarget->GetObjectSize (), CONTACT_DISTANCE);
|
||||
pet->Relocate (x, y, z, M_PI-player->GetOrientation ());
|
||||
|
||||
// set pet to defensive mode by default (some classes can't control controlled pets in fact).
|
||||
pet->SetReactState(REACT_DEFENSIVE);
|
||||
@@ -1218,14 +1218,14 @@ public:
|
||||
|
||||
group_member = new FormationInfo;
|
||||
group_member->follow_angle = (pCreature->GetAngle(chr) - chr->GetOrientation()) * 180 / M_PI;
|
||||
group_member->follow_dist = sqrtf(pow(chr->GetPositionX() - pCreature->GetPositionX(),int(2))+pow(chr->GetPositionY()-pCreature->GetPositionY(),int(2)));
|
||||
group_member->follow_dist = sqrtf(pow(chr->GetPositionX() - pCreature->GetPositionX(), int(2))+pow(chr->GetPositionY()-pCreature->GetPositionY(), int(2)));
|
||||
group_member->leaderGUID = leaderGUID;
|
||||
group_member->groupAI = 0;
|
||||
|
||||
CreatureGroupMap[lowguid] = group_member;
|
||||
pCreature->SearchFormation();
|
||||
|
||||
WorldDatabase.PExecute("INSERT INTO creature_formations (leaderGUID, memberGUID, dist, angle, groupAI) VALUES ('%u','%u','%f', '%f', '%u')",
|
||||
WorldDatabase.PExecute("INSERT INTO creature_formations (leaderGUID, memberGUID, dist, angle, groupAI) VALUES ('%u', '%u', '%f', '%f', '%u')",
|
||||
leaderGUID, lowguid, group_member->follow_dist, group_member->follow_angle, group_member->groupAI);
|
||||
|
||||
handler->PSendSysMessage("Creature %u added to formation with leader %u", lowguid, leaderGUID);
|
||||
@@ -1319,17 +1319,17 @@ public:
|
||||
added = true;
|
||||
break;
|
||||
default:
|
||||
handler->PSendSysMessage(LANG_ITEM_SLOT_NOT_EXIST,SlotID);
|
||||
handler->PSendSysMessage(LANG_ITEM_SLOT_NOT_EXIST, SlotID);
|
||||
added = false;
|
||||
break;
|
||||
}
|
||||
|
||||
if (added)
|
||||
handler->PSendSysMessage(LANG_ITEM_ADDED_TO_SLOT,ItemID,tmpItem->Name1,SlotID);
|
||||
handler->PSendSysMessage(LANG_ITEM_ADDED_TO_SLOT, ItemID, tmpItem->Name1, SlotID);
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_ITEM_NOT_FOUND,ItemID);
|
||||
handler->PSendSysMessage(LANG_ITEM_NOT_FOUND, ItemID);
|
||||
return true;
|
||||
}
|
||||
*/
|
||||
@@ -1420,7 +1420,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
uint32 idname = sObjectMgr->AddCreatureSubName(pCreature->GetName(),args,pCreature->GetUInt32Value(UNIT_FIELD_DISPLAYID));
|
||||
uint32 idname = sObjectMgr->AddCreatureSubName(pCreature->GetName(), args, pCreature->GetUInt32Value(UNIT_FIELD_DISPLAYID));
|
||||
pCreature->SetUInt32Value(OBJECT_FIELD_ENTRY, idname);
|
||||
|
||||
pCreature->SaveToDB();
|
||||
|
||||
@@ -60,7 +60,7 @@ public:
|
||||
|
||||
// .addquest #entry'
|
||||
// number or [name] Shift-click form |color|Hquest:quest_id:quest_level|h[name]|h|r
|
||||
char* cId = handler->extractKeyFromLink((char*)args,"Hquest");
|
||||
char* cId = handler->extractKeyFromLink((char*)args, "Hquest");
|
||||
if (!cId)
|
||||
return false;
|
||||
|
||||
@@ -70,7 +70,7 @@ public:
|
||||
|
||||
if (!pQuest)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_COMMAND_QUEST_NOTFOUND,entry);
|
||||
handler->PSendSysMessage(LANG_COMMAND_QUEST_NOTFOUND, entry);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
@@ -110,7 +110,7 @@ public:
|
||||
|
||||
// .removequest #entry'
|
||||
// number or [name] Shift-click form |color|Hquest:quest_id:quest_level|h[name]|h|r
|
||||
char* cId = handler->extractKeyFromLink((char*)args,"Hquest");
|
||||
char* cId = handler->extractKeyFromLink((char*)args, "Hquest");
|
||||
if (!cId)
|
||||
return false;
|
||||
|
||||
@@ -131,7 +131,7 @@ public:
|
||||
uint32 quest = player->GetQuestSlotQuestId(slot);
|
||||
if (quest == entry)
|
||||
{
|
||||
player->SetQuestSlot(slot,0);
|
||||
player->SetQuestSlot(slot, 0);
|
||||
|
||||
// we ignore unequippable quest items in this case, its' still be equipped
|
||||
player->TakeQuestSourceItem(quest, false);
|
||||
@@ -157,7 +157,7 @@ public:
|
||||
|
||||
// .quest complete #entry
|
||||
// number or [name] Shift-click form |color|Hquest:quest_id:quest_level|h[name]|h|r
|
||||
char* cId = handler->extractKeyFromLink((char*)args,"Hquest");
|
||||
char* cId = handler->extractKeyFromLink((char*)args, "Hquest");
|
||||
if (!cId)
|
||||
return false;
|
||||
|
||||
@@ -181,14 +181,14 @@ public:
|
||||
if (!id || !count)
|
||||
continue;
|
||||
|
||||
uint32 curItemCount = player->GetItemCount(id,true);
|
||||
uint32 curItemCount = player->GetItemCount(id, true);
|
||||
|
||||
ItemPosCountVec dest;
|
||||
uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, id, count-curItemCount);
|
||||
if (msg == EQUIP_ERR_OK)
|
||||
{
|
||||
Item* item = player->StoreNewItem(dest, id, true);
|
||||
player->SendNewItem(item,count-curItemCount,true,false);
|
||||
player->SendNewItem(item, count-curItemCount, true, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -201,18 +201,18 @@ public:
|
||||
if (uint32 spell_id = pQuest->ReqSpell[i])
|
||||
{
|
||||
for (uint16 z = 0; z < creaturecount; ++z)
|
||||
player->CastedCreatureOrGO(creature,0,spell_id);
|
||||
player->CastedCreatureOrGO(creature, 0, spell_id);
|
||||
}
|
||||
else if (creature > 0)
|
||||
{
|
||||
if (CreatureTemplate const* cInfo = sObjectMgr->GetCreatureTemplate(creature))
|
||||
for (uint16 z = 0; z < creaturecount; ++z)
|
||||
player->KilledMonster(cInfo,0);
|
||||
player->KilledMonster(cInfo, 0);
|
||||
}
|
||||
else if (creature < 0)
|
||||
{
|
||||
for (uint16 z = 0; z < creaturecount; ++z)
|
||||
player->CastedCreatureOrGO(creature,0,0);
|
||||
player->CastedCreatureOrGO(creature, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -223,7 +223,7 @@ public:
|
||||
uint32 curRep = player->GetReputationMgr().GetReputation(repFaction);
|
||||
if (curRep < repValue)
|
||||
if (FactionEntry const *factionEntry = sFactionStore.LookupEntry(repFaction))
|
||||
player->GetReputationMgr().SetReputation(factionEntry,repValue);
|
||||
player->GetReputationMgr().SetReputation(factionEntry, repValue);
|
||||
}
|
||||
|
||||
// If the quest requires a SECOND reputation to complete
|
||||
@@ -233,7 +233,7 @@ public:
|
||||
uint32 curRep = player->GetReputationMgr().GetReputation(repFaction);
|
||||
if (curRep < repValue2)
|
||||
if (FactionEntry const *factionEntry = sFactionStore.LookupEntry(repFaction))
|
||||
player->GetReputationMgr().SetReputation(factionEntry,repValue2);
|
||||
player->GetReputationMgr().SetReputation(factionEntry, repValue2);
|
||||
}
|
||||
|
||||
// If the quest requires money
|
||||
|
||||
@@ -46,7 +46,7 @@ public:
|
||||
{
|
||||
static ChatCommand reloadAllCommandTable[] =
|
||||
{
|
||||
{ "achievement",SEC_ADMINISTRATOR, true, &HandleReloadAllAchievementCommand,"", NULL },
|
||||
{ "achievement", SEC_ADMINISTRATOR, true, &HandleReloadAllAchievementCommand, "", NULL },
|
||||
{ "area", SEC_ADMINISTRATOR, true, &HandleReloadAllAreaCommand, "", NULL },
|
||||
{ "eventai", SEC_ADMINISTRATOR, true, &HandleReloadAllEventAICommand, "", NULL },
|
||||
{ "gossips", SEC_ADMINISTRATOR, true, &HandleReloadAllGossipsCommand, "", NULL },
|
||||
@@ -78,7 +78,7 @@ public:
|
||||
{ "creature_ai_scripts", SEC_ADMINISTRATOR, true, &HandleReloadEventAIScriptsCommand, "", NULL },
|
||||
{ "creature_ai_summons", SEC_ADMINISTRATOR, true, &HandleReloadEventAISummonsCommand, "", NULL },
|
||||
{ "creature_ai_texts", SEC_ADMINISTRATOR, true, &HandleReloadEventAITextsCommand, "", NULL },
|
||||
{ "creature_involvedrelation", SEC_ADMINISTRATOR, true, &HandleReloadCreatureQuestInvRelationsCommand, "",NULL },
|
||||
{ "creature_involvedrelation", SEC_ADMINISTRATOR, true, &HandleReloadCreatureQuestInvRelationsCommand, "", NULL },
|
||||
{ "creature_linked_respawn", SEC_GAMEMASTER, true, &HandleReloadLinkedRespawnCommand, "", NULL },
|
||||
{ "creature_loot_template", SEC_ADMINISTRATOR, true, &HandleReloadLootTemplatesCreatureCommand, "", NULL },
|
||||
{ "creature_onkill_reputation", SEC_ADMINISTRATOR, true, &HandleReloadOnKillReputationCommand, "", NULL },
|
||||
@@ -116,11 +116,11 @@ public:
|
||||
{ "mail_level_reward", SEC_ADMINISTRATOR, true, &HandleReloadMailLevelRewardCommand, "", NULL },
|
||||
{ "mail_loot_template", SEC_ADMINISTRATOR, true, &HandleReloadLootTemplatesMailCommand, "", NULL },
|
||||
{ "milling_loot_template", SEC_ADMINISTRATOR, true, &HandleReloadLootTemplatesMillingCommand, "", NULL },
|
||||
{ "npc_spellclick_spells", SEC_ADMINISTRATOR, true, &HandleReloadSpellClickSpellsCommand, "",NULL},
|
||||
{ "npc_spellclick_spells", SEC_ADMINISTRATOR, true, &HandleReloadSpellClickSpellsCommand, "", NULL},
|
||||
{ "npc_trainer", SEC_ADMINISTRATOR, true, &HandleReloadNpcTrainerCommand, "", NULL },
|
||||
{ "npc_vendor", SEC_ADMINISTRATOR, true, &HandleReloadNpcVendorCommand, "", NULL },
|
||||
{ "page_text", SEC_ADMINISTRATOR, true, &HandleReloadPageTextsCommand, "", NULL },
|
||||
{ "pickpocketing_loot_template", SEC_ADMINISTRATOR, true, &HandleReloadLootTemplatesPickpocketingCommand, "",NULL},
|
||||
{ "pickpocketing_loot_template", SEC_ADMINISTRATOR, true, &HandleReloadLootTemplatesPickpocketingCommand, "", NULL},
|
||||
{ "points_of_interest", SEC_ADMINISTRATOR, true, &HandleReloadPointsOfInterestCommand, "", NULL },
|
||||
{ "prospecting_loot_template", SEC_ADMINISTRATOR, true, &HandleReloadLootTemplatesProspectingCommand, "", NULL },
|
||||
{ "quest_end_scripts", SEC_ADMINISTRATOR, true, &HandleReloadQuestEndScriptsCommand, "", NULL },
|
||||
@@ -130,7 +130,7 @@ public:
|
||||
{ "reference_loot_template", SEC_ADMINISTRATOR, true, &HandleReloadLootTemplatesReferenceCommand, "", NULL },
|
||||
{ "reserved_name", SEC_ADMINISTRATOR, true, &HandleReloadReservedNameCommand, "", NULL },
|
||||
{ "reputation_reward_rate", SEC_ADMINISTRATOR, true, &HandleReloadReputationRewardRateCommand, "", NULL },
|
||||
{ "reputation_spillover_template",SEC_ADMINISTRATOR, true, &HandleReloadReputationRewardRateCommand, "", NULL },
|
||||
{ "reputation_spillover_template", SEC_ADMINISTRATOR, true, &HandleReloadReputationRewardRateCommand, "", NULL },
|
||||
{ "skill_discovery_template", SEC_ADMINISTRATOR, true, &HandleReloadSkillDiscoveryTemplateCommand, "", NULL },
|
||||
{ "skill_extra_item_template", SEC_ADMINISTRATOR, true, &HandleReloadSkillExtraItemTemplateCommand, "", NULL },
|
||||
{ "skill_fishing_base_level", SEC_ADMINISTRATOR, true, &HandleReloadSkillFishingBaseLevelCommand, "", NULL },
|
||||
@@ -172,46 +172,46 @@ public:
|
||||
|
||||
static bool HandleReloadAllCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
HandleReloadSkillFishingBaseLevelCommand(handler,"");
|
||||
HandleReloadSkillFishingBaseLevelCommand(handler, "");
|
||||
|
||||
HandleReloadAllAchievementCommand(handler,"");
|
||||
HandleReloadAllAreaCommand(handler,"");
|
||||
HandleReloadAllEventAICommand(handler,"");
|
||||
HandleReloadAllLootCommand(handler,"");
|
||||
HandleReloadAllNpcCommand(handler,"");
|
||||
HandleReloadAllQuestCommand(handler,"");
|
||||
HandleReloadAllSpellCommand(handler,"");
|
||||
HandleReloadAllItemCommand(handler,"");
|
||||
HandleReloadAllGossipsCommand(handler,"");
|
||||
HandleReloadAllLocalesCommand(handler,"");
|
||||
HandleReloadAllAchievementCommand(handler, "");
|
||||
HandleReloadAllAreaCommand(handler, "");
|
||||
HandleReloadAllEventAICommand(handler, "");
|
||||
HandleReloadAllLootCommand(handler, "");
|
||||
HandleReloadAllNpcCommand(handler, "");
|
||||
HandleReloadAllQuestCommand(handler, "");
|
||||
HandleReloadAllSpellCommand(handler, "");
|
||||
HandleReloadAllItemCommand(handler, "");
|
||||
HandleReloadAllGossipsCommand(handler, "");
|
||||
HandleReloadAllLocalesCommand(handler, "");
|
||||
|
||||
HandleReloadAccessRequirementCommand(handler,"");
|
||||
HandleReloadMailLevelRewardCommand(handler,"");
|
||||
HandleReloadCommandCommand(handler,"");
|
||||
HandleReloadReservedNameCommand(handler,"");
|
||||
HandleReloadTrinityStringCommand(handler,"");
|
||||
HandleReloadGameTeleCommand(handler,"");
|
||||
HandleReloadAccessRequirementCommand(handler, "");
|
||||
HandleReloadMailLevelRewardCommand(handler, "");
|
||||
HandleReloadCommandCommand(handler, "");
|
||||
HandleReloadReservedNameCommand(handler, "");
|
||||
HandleReloadTrinityStringCommand(handler, "");
|
||||
HandleReloadGameTeleCommand(handler, "");
|
||||
|
||||
HandleReloadVehicleAccessoryCommand(handler, "");
|
||||
HandleReloadVehicleTemplateAccessoryCommand(handler, "");
|
||||
|
||||
HandleReloadAutobroadcastCommand(handler,"");
|
||||
HandleReloadAutobroadcastCommand(handler, "");
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleReloadAllAchievementCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
HandleReloadAchievementCriteriaDataCommand(handler,"");
|
||||
HandleReloadAchievementRewardCommand(handler,"");
|
||||
HandleReloadAchievementCriteriaDataCommand(handler, "");
|
||||
HandleReloadAchievementRewardCommand(handler, "");
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleReloadAllAreaCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
//HandleReloadQuestAreaTriggersCommand(handler,""); -- reloaded in HandleReloadAllQuestCommand
|
||||
HandleReloadAreaTriggerTeleportCommand(handler,"");
|
||||
HandleReloadAreaTriggerTavernCommand(handler,"");
|
||||
HandleReloadGameGraveyardZoneCommand(handler,"");
|
||||
//HandleReloadQuestAreaTriggersCommand(handler, ""); -- reloaded in HandleReloadAllQuestCommand
|
||||
HandleReloadAreaTriggerTeleportCommand(handler, "");
|
||||
HandleReloadAreaTriggerTavernCommand(handler, "");
|
||||
HandleReloadGameGraveyardZoneCommand(handler, "");
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -227,18 +227,18 @@ public:
|
||||
static bool HandleReloadAllNpcCommand(ChatHandler* handler, const char* args)
|
||||
{
|
||||
if(*args != 'a') // will be reloaded from all_gossips
|
||||
HandleReloadNpcTrainerCommand(handler,"a");
|
||||
HandleReloadNpcVendorCommand(handler,"a");
|
||||
HandleReloadPointsOfInterestCommand(handler,"a");
|
||||
HandleReloadSpellClickSpellsCommand(handler,"a");
|
||||
HandleReloadNpcTrainerCommand(handler, "a");
|
||||
HandleReloadNpcVendorCommand(handler, "a");
|
||||
HandleReloadPointsOfInterestCommand(handler, "a");
|
||||
HandleReloadSpellClickSpellsCommand(handler, "a");
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleReloadAllQuestCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
HandleReloadQuestAreaTriggersCommand(handler,"a");
|
||||
HandleReloadQuestPOICommand(handler,"a");
|
||||
HandleReloadQuestTemplateCommand(handler,"a");
|
||||
HandleReloadQuestAreaTriggersCommand(handler, "a");
|
||||
HandleReloadQuestPOICommand(handler, "a");
|
||||
HandleReloadQuestTemplateCommand(handler, "a");
|
||||
|
||||
sLog->outString("Re-Loading Quests Relations...");
|
||||
sObjectMgr->LoadQuestRelations();
|
||||
@@ -256,72 +256,72 @@ public:
|
||||
}
|
||||
|
||||
sLog->outString("Re-Loading Scripts...");
|
||||
HandleReloadGameObjectScriptsCommand(handler,"a");
|
||||
HandleReloadGossipScriptsCommand(handler,"a");
|
||||
HandleReloadEventScriptsCommand(handler,"a");
|
||||
HandleReloadQuestEndScriptsCommand(handler,"a");
|
||||
HandleReloadQuestStartScriptsCommand(handler,"a");
|
||||
HandleReloadSpellScriptsCommand(handler,"a");
|
||||
HandleReloadGameObjectScriptsCommand(handler, "a");
|
||||
HandleReloadGossipScriptsCommand(handler, "a");
|
||||
HandleReloadEventScriptsCommand(handler, "a");
|
||||
HandleReloadQuestEndScriptsCommand(handler, "a");
|
||||
HandleReloadQuestStartScriptsCommand(handler, "a");
|
||||
HandleReloadSpellScriptsCommand(handler, "a");
|
||||
handler->SendGlobalGMSysMessage("DB tables `*_scripts` reloaded.");
|
||||
HandleReloadDbScriptStringCommand(handler,"a");
|
||||
HandleReloadWpScriptsCommand(handler,"a");
|
||||
HandleReloadDbScriptStringCommand(handler, "a");
|
||||
HandleReloadWpScriptsCommand(handler, "a");
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleReloadAllEventAICommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
HandleReloadEventAITextsCommand(handler,"a");
|
||||
HandleReloadEventAISummonsCommand(handler,"a");
|
||||
HandleReloadEventAIScriptsCommand(handler,"a");
|
||||
HandleReloadEventAITextsCommand(handler, "a");
|
||||
HandleReloadEventAISummonsCommand(handler, "a");
|
||||
HandleReloadEventAIScriptsCommand(handler, "a");
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleReloadAllSpellCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
HandleReloadSkillDiscoveryTemplateCommand(handler,"a");
|
||||
HandleReloadSkillExtraItemTemplateCommand(handler,"a");
|
||||
HandleReloadSpellRequiredCommand(handler,"a");
|
||||
HandleReloadSpellAreaCommand(handler,"a");
|
||||
HandleReloadSpellGroupsCommand(handler,"a");
|
||||
HandleReloadSpellLearnSpellCommand(handler,"a");
|
||||
HandleReloadSpellLinkedSpellCommand(handler,"a");
|
||||
HandleReloadSpellProcEventCommand(handler,"a");
|
||||
HandleReloadSpellBonusesCommand(handler,"a");
|
||||
HandleReloadSpellTargetPositionCommand(handler,"a");
|
||||
HandleReloadSpellThreatsCommand(handler,"a");
|
||||
HandleReloadSpellGroupStackRulesCommand(handler,"a");
|
||||
HandleReloadSpellPetAurasCommand(handler,"a");
|
||||
HandleReloadSkillDiscoveryTemplateCommand(handler, "a");
|
||||
HandleReloadSkillExtraItemTemplateCommand(handler, "a");
|
||||
HandleReloadSpellRequiredCommand(handler, "a");
|
||||
HandleReloadSpellAreaCommand(handler, "a");
|
||||
HandleReloadSpellGroupsCommand(handler, "a");
|
||||
HandleReloadSpellLearnSpellCommand(handler, "a");
|
||||
HandleReloadSpellLinkedSpellCommand(handler, "a");
|
||||
HandleReloadSpellProcEventCommand(handler, "a");
|
||||
HandleReloadSpellBonusesCommand(handler, "a");
|
||||
HandleReloadSpellTargetPositionCommand(handler, "a");
|
||||
HandleReloadSpellThreatsCommand(handler, "a");
|
||||
HandleReloadSpellGroupStackRulesCommand(handler, "a");
|
||||
HandleReloadSpellPetAurasCommand(handler, "a");
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleReloadAllGossipsCommand(ChatHandler* handler, const char* args)
|
||||
{
|
||||
HandleReloadGossipMenuCommand(handler,"a");
|
||||
HandleReloadGossipMenuOptionCommand(handler,"a");
|
||||
HandleReloadGossipMenuCommand(handler, "a");
|
||||
HandleReloadGossipMenuOptionCommand(handler, "a");
|
||||
if(*args != 'a') // already reload from all_scripts
|
||||
HandleReloadGossipScriptsCommand(handler,"a");
|
||||
HandleReloadPointsOfInterestCommand(handler,"a");
|
||||
HandleReloadGossipScriptsCommand(handler, "a");
|
||||
HandleReloadPointsOfInterestCommand(handler, "a");
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleReloadAllItemCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
HandleReloadPageTextsCommand(handler,"a");
|
||||
HandleReloadItemEnchantementsCommand(handler,"a");
|
||||
HandleReloadPageTextsCommand(handler, "a");
|
||||
HandleReloadItemEnchantementsCommand(handler, "a");
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleReloadAllLocalesCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
HandleReloadLocalesAchievementRewardCommand(handler,"a");
|
||||
HandleReloadLocalesCreatureCommand(handler,"a");
|
||||
HandleReloadLocalesGameobjectCommand(handler,"a");
|
||||
HandleReloadLocalesGossipMenuOptionCommand(handler,"a");
|
||||
HandleReloadLocalesItemCommand(handler,"a");
|
||||
HandleReloadLocalesNpcTextCommand(handler,"a");
|
||||
HandleReloadLocalesPageTextCommand(handler,"a");
|
||||
HandleReloadLocalesPointsOfInterestCommand(handler,"a");
|
||||
HandleReloadLocalesQuestCommand(handler,"a");
|
||||
HandleReloadLocalesAchievementRewardCommand(handler, "a");
|
||||
HandleReloadLocalesCreatureCommand(handler, "a");
|
||||
HandleReloadLocalesGameobjectCommand(handler, "a");
|
||||
HandleReloadLocalesGossipMenuOptionCommand(handler, "a");
|
||||
HandleReloadLocalesItemCommand(handler, "a");
|
||||
HandleReloadLocalesNpcTextCommand(handler, "a");
|
||||
HandleReloadLocalesPageTextCommand(handler, "a");
|
||||
HandleReloadLocalesPointsOfInterestCommand(handler, "a");
|
||||
HandleReloadLocalesQuestCommand(handler, "a");
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -403,7 +403,7 @@ public:
|
||||
return false;
|
||||
|
||||
uint32 entry = (uint32) atoi((char*)args);
|
||||
QueryResult result = WorldDatabase.PQuery("SELECT difficulty_entry_1,difficulty_entry_2,difficulty_entry_3,KillCredit1,KillCredit2,modelid1,modelid2,modelid3,modelid4,name,subname,IconName,gossip_menu_id,minlevel,maxlevel,exp,faction_A,faction_H,npcflag,speed_walk,speed_run,scale,rank,mindmg,maxdmg,dmgschool,attackpower,dmg_multiplier,baseattacktime,rangeattacktime,unit_class,unit_flags,dynamicflags,family,trainer_type,trainer_spell,trainer_class,trainer_race,minrangedmg,maxrangedmg,rangedattackpower,type,type_flags,lootid,pickpocketloot,skinloot,resistance1,resistance2,resistance3,resistance4,resistance5,resistance6,spell1,spell2,spell3,spell4,spell5,spell6,spell7,spell8,PetSpellDataId,VehicleId,mingold,maxgold,AIName,MovementType,InhabitType,Health_mod,Mana_mod,Armor_mod,RacialLeader,questItem1,questItem2,questItem3,questItem4,questItem5,questItem6,movementId,RegenHealth,equipment_id,mechanic_immune_mask,flags_extra,ScriptName FROM creature_template WHERE entry = %u", entry);
|
||||
QueryResult result = WorldDatabase.PQuery("SELECT difficulty_entry_1, difficulty_entry_2, difficulty_entry_3, KillCredit1, KillCredit2, modelid1, modelid2, modelid3, modelid4, name, subname, IconName, gossip_menu_id, minlevel, maxlevel, exp, faction_A, faction_H, npcflag, speed_walk, speed_run, scale, rank, mindmg, maxdmg, dmgschool, attackpower, dmg_multiplier, baseattacktime, rangeattacktime, unit_class, unit_flags, dynamicflags, family, trainer_type, trainer_spell, trainer_class, trainer_race, minrangedmg, maxrangedmg, rangedattackpower, type, type_flags, lootid, pickpocketloot, skinloot, resistance1, resistance2, resistance3, resistance4, resistance5, resistance6, spell1, spell2, spell3, spell4, spell5, spell6, spell7, spell8, PetSpellDataId, VehicleId, mingold, maxgold, AIName, MovementType, InhabitType, Health_mod, Mana_mod, Armor_mod, RacialLeader, questItem1, questItem2, questItem3, questItem4, questItem5, questItem6, movementId, RegenHealth, equipment_id, mechanic_immune_mask, flags_extra, ScriptName FROM creature_template WHERE entry = %u", entry);
|
||||
if (!result)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_COMMAND_CREATURETEMPLATE_NOTFOUND, entry);
|
||||
|
||||
@@ -115,14 +115,14 @@ public:
|
||||
{
|
||||
char* nameStr;
|
||||
char* teleStr;
|
||||
handler->extractOptFirstArg((char*)args,&nameStr,&teleStr);
|
||||
handler->extractOptFirstArg((char*)args, &nameStr, &teleStr);
|
||||
if (!teleStr)
|
||||
return false;
|
||||
|
||||
Player* target;
|
||||
uint64 target_guid;
|
||||
std::string target_name;
|
||||
if (!handler->extractPlayerTarget(nameStr,&target,&target_guid,&target_name))
|
||||
if (!handler->extractPlayerTarget(nameStr, &target, &target_guid, &target_name))
|
||||
return false;
|
||||
|
||||
// id, or string, or [name] Shift-click form |color|Htele:id|h[name]|h|r
|
||||
@@ -149,7 +149,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(LANG_TELEPORTING_TO, chrNameLink.c_str(),"", tele->name.c_str());
|
||||
handler->PSendSysMessage(LANG_TELEPORTING_TO, chrNameLink.c_str(), "", tele->name.c_str());
|
||||
if (handler->needReportToTarget(target))
|
||||
(ChatHandler(target)).PSendSysMessage(LANG_TELEPORTED_TO_BY, handler->GetNameLink().c_str());
|
||||
|
||||
@@ -163,7 +163,7 @@ public:
|
||||
else
|
||||
target->SaveRecallPosition();
|
||||
|
||||
target->TeleportTo(tele->mapId,tele->position_x,tele->position_y,tele->position_z,tele->orientation);
|
||||
target->TeleportTo(tele->mapId, tele->position_x, tele->position_y, tele->position_z, tele->orientation);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -174,8 +174,8 @@ public:
|
||||
std::string nameLink = handler->playerLink(target_name);
|
||||
|
||||
handler->PSendSysMessage(LANG_TELEPORTING_TO, nameLink.c_str(), handler->GetTrinityString(LANG_OFFLINE), tele->name.c_str());
|
||||
Player::SavePositionInDB(tele->mapId,tele->position_x,tele->position_y,tele->position_z,tele->orientation,
|
||||
sMapMgr->GetZoneId(tele->mapId,tele->position_x,tele->position_y,tele->position_z),target_guid);
|
||||
Player::SavePositionInDB(tele->mapId, tele->position_x, tele->position_y, tele->position_z, tele->orientation,
|
||||
sMapMgr->GetZoneId(tele->mapId, tele->position_x, tele->position_y, tele->position_z), target_guid);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -221,7 +221,7 @@ public:
|
||||
Group *grp = player->GetGroup();
|
||||
if (!grp)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_NOT_IN_GROUP,nameLink.c_str());
|
||||
handler->PSendSysMessage(LANG_NOT_IN_GROUP, nameLink.c_str());
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
@@ -245,7 +245,7 @@ public:
|
||||
continue;
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(LANG_TELEPORTING_TO, plNameLink.c_str(),"", tele->name.c_str());
|
||||
handler->PSendSysMessage(LANG_TELEPORTING_TO, plNameLink.c_str(), "", tele->name.c_str());
|
||||
if (handler->needReportToTarget(pl))
|
||||
(ChatHandler(pl)).PSendSysMessage(LANG_TELEPORTED_TO_BY, nameLink.c_str());
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
static bool HandleTitlesCurrentCommand(ChatHandler* handler, const char* args)
|
||||
{
|
||||
// number or [name] Shift-click form |color|Htitle:title_id|h[name]|h|r
|
||||
char* id_p = handler->extractKeyFromLink((char*)args,"Htitle");
|
||||
char* id_p = handler->extractKeyFromLink((char*)args, "Htitle");
|
||||
if (!id_p)
|
||||
return false;
|
||||
|
||||
@@ -92,7 +92,7 @@ public:
|
||||
std::string tNameLink = handler->GetNameLink(target);
|
||||
|
||||
target->SetTitle(titleInfo); // to be sure that title now known
|
||||
target->SetUInt32Value(PLAYER_CHOSEN_TITLE,titleInfo->bit_index);
|
||||
target->SetUInt32Value(PLAYER_CHOSEN_TITLE, titleInfo->bit_index);
|
||||
|
||||
handler->PSendSysMessage(LANG_TITLE_CURRENT_RES, id, titleInfo->name[handler->GetSessionDbcLocale()], tNameLink.c_str());
|
||||
|
||||
@@ -102,7 +102,7 @@ public:
|
||||
static bool HandleTitlesAddCommand(ChatHandler* handler, const char* args)
|
||||
{
|
||||
// number or [name] Shift-click form |color|Htitle:title_id|h[name]|h|r
|
||||
char* id_p = handler->extractKeyFromLink((char*)args,"Htitle");
|
||||
char* id_p = handler->extractKeyFromLink((char*)args, "Htitle");
|
||||
if (!id_p)
|
||||
return false;
|
||||
|
||||
@@ -138,7 +138,7 @@ public:
|
||||
|
||||
char const* targetName = target->GetName();
|
||||
char titleNameStr[80];
|
||||
snprintf(titleNameStr,80,titleInfo->name[handler->GetSessionDbcLocale()],targetName);
|
||||
snprintf(titleNameStr, 80, titleInfo->name[handler->GetSessionDbcLocale()], targetName);
|
||||
|
||||
target->SetTitle(titleInfo);
|
||||
handler->PSendSysMessage(LANG_TITLE_ADD_RES, id, titleNameStr, tNameLink.c_str());
|
||||
@@ -149,7 +149,7 @@ public:
|
||||
static bool HandleTitlesRemoveCommand(ChatHandler* handler, const char* args)
|
||||
{
|
||||
// number or [name] Shift-click form |color|Htitle:title_id|h[name]|h|r
|
||||
char* id_p = handler->extractKeyFromLink((char*)args,"Htitle");
|
||||
char* id_p = handler->extractKeyFromLink((char*)args, "Htitle");
|
||||
if (!id_p)
|
||||
return false;
|
||||
|
||||
@@ -181,19 +181,19 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
target->SetTitle(titleInfo,true);
|
||||
target->SetTitle(titleInfo, true);
|
||||
|
||||
std::string tNameLink = handler->GetNameLink(target);
|
||||
|
||||
char const* targetName = target->GetName();
|
||||
char titleNameStr[80];
|
||||
snprintf(titleNameStr,80,titleInfo->name[handler->GetSessionDbcLocale()],targetName);
|
||||
snprintf(titleNameStr, 80, titleInfo->name[handler->GetSessionDbcLocale()], targetName);
|
||||
|
||||
handler->PSendSysMessage(LANG_TITLE_REMOVE_RES, id, titleNameStr, tNameLink.c_str());
|
||||
|
||||
if (!target->HasTitle(target->GetInt32Value(PLAYER_CHOSEN_TITLE)))
|
||||
{
|
||||
target->SetUInt32Value(PLAYER_CHOSEN_TITLE,0);
|
||||
target->SetUInt32Value(PLAYER_CHOSEN_TITLE, 0);
|
||||
handler->PSendSysMessage(LANG_CURRENT_TITLE_RESET, tNameLink.c_str());
|
||||
}
|
||||
|
||||
@@ -235,8 +235,8 @@ public:
|
||||
|
||||
if (!target->HasTitle(target->GetInt32Value(PLAYER_CHOSEN_TITLE)))
|
||||
{
|
||||
target->SetUInt32Value(PLAYER_CHOSEN_TITLE,0);
|
||||
handler->PSendSysMessage(LANG_CURRENT_TITLE_RESET,handler->GetNameLink(target).c_str());
|
||||
target->SetUInt32Value(PLAYER_CHOSEN_TITLE, 0);
|
||||
handler->PSendSysMessage(LANG_CURRENT_TITLE_RESET, handler->GetNameLink(target).c_str());
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -109,7 +109,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
QueryResult result = WorldDatabase.PQuery("SELECT MAX(point) FROM waypoint_data WHERE id = '%u'",pathid);
|
||||
QueryResult result = WorldDatabase.PQuery("SELECT MAX(point) FROM waypoint_data WHERE id = '%u'", pathid);
|
||||
|
||||
if (result)
|
||||
point = (*result)[0].GetUInt32();
|
||||
@@ -117,10 +117,10 @@ public:
|
||||
Player* player = handler->GetSession()->GetPlayer();
|
||||
//Map *map = player->GetMap();
|
||||
|
||||
WorldDatabase.PExecute("INSERT INTO waypoint_data (id, point, position_x, position_y, position_z) VALUES ('%u','%u','%f', '%f', '%f')",
|
||||
WorldDatabase.PExecute("INSERT INTO waypoint_data (id, point, position_x, position_y, position_z) VALUES ('%u', '%u', '%f', '%f', '%f')",
|
||||
pathid, point+1, player->GetPositionX(), player->GetPositionY(), player->GetPositionZ());
|
||||
|
||||
handler->PSendSysMessage("%s%s%u%s%u%s|r", "|cff00ff00", "PathID: |r|cff00ffff", pathid, "|r|cff00ff00: Waypoint |r|cff00ffff", point+1,"|r|cff00ff00 created. ");
|
||||
handler->PSendSysMessage("%s%s%u%s%u%s|r", "|cff00ff00", "PathID: |r|cff00ffff", pathid, "|r|cff00ff00: Waypoint |r|cff00ffff", point+1, "|r|cff00ff00 created. ");
|
||||
return true;
|
||||
} // HandleWpAddCommand
|
||||
|
||||
@@ -166,19 +166,19 @@ public:
|
||||
}
|
||||
|
||||
guidlow = target->GetDBTableGUIDLow();
|
||||
QueryResult result = WorldDatabase.PQuery("SELECT guid FROM creature_addon WHERE guid = '%u'",guidlow);
|
||||
QueryResult result = WorldDatabase.PQuery("SELECT guid FROM creature_addon WHERE guid = '%u'", guidlow);
|
||||
|
||||
if (result)
|
||||
WorldDatabase.PExecute("UPDATE creature_addon SET path_id = '%u' WHERE guid = '%u'", pathid, guidlow);
|
||||
else
|
||||
WorldDatabase.PExecute("INSERT INTO creature_addon(guid,path_id) VALUES ('%u','%u')", guidlow, pathid);
|
||||
WorldDatabase.PExecute("INSERT INTO creature_addon(guid, path_id) VALUES ('%u', '%u')", guidlow, pathid);
|
||||
|
||||
WorldDatabase.PExecute("UPDATE creature SET MovementType = '%u' WHERE guid = '%u'", WAYPOINT_MOTION_TYPE, guidlow);
|
||||
|
||||
target->LoadPath(pathid);
|
||||
target->SetDefaultMovementType(WAYPOINT_MOTION_TYPE);
|
||||
target->GetMotionMaster()->Initialize();
|
||||
target->MonsterSay("Path loaded.",0,0);
|
||||
target->MonsterSay("Path loaded.", 0, 0);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -219,7 +219,7 @@ public:
|
||||
target->SetDefaultMovementType(IDLE_MOTION_TYPE);
|
||||
target->GetMotionMaster()->MoveTargetedHome();
|
||||
target->GetMotionMaster()->Initialize();
|
||||
target->MonsterSay("Path unloaded.",0,0);
|
||||
target->MonsterSay("Path unloaded.", 0, 0);
|
||||
return true;
|
||||
}
|
||||
handler->PSendSysMessage("%s%s|r", "|cffff33ff", "Target have no loaded path.");
|
||||
@@ -263,7 +263,7 @@ public:
|
||||
QueryResult result = WorldDatabase.Query("SELECT MAX(guid) FROM waypoint_scripts");
|
||||
id = result->Fetch()->GetUInt32();
|
||||
WorldDatabase.PExecute("INSERT INTO waypoint_scripts(guid)VALUES(%u)", id+1);
|
||||
handler->PSendSysMessage("%s%s%u|r", "|cff00ff00","Wp Event: New waypoint event added: |r|cff00ffff", id+1);
|
||||
handler->PSendSysMessage("%s%s%u|r", "|cff00ff00", "Wp Event: New waypoint event added: |r|cff00ffff", id+1);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -273,7 +273,7 @@ public:
|
||||
{
|
||||
if (!arg_id)
|
||||
{
|
||||
handler->PSendSysMessage("%s%s|r", "|cff33ffff","Wp Event: You must provide waypoint script id.");
|
||||
handler->PSendSysMessage("%s%s|r", "|cff33ffff", "Wp Event: You must provide waypoint script id.");
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -321,7 +321,7 @@ public:
|
||||
if (result)
|
||||
{
|
||||
WorldDatabase.PExecute("DELETE FROM waypoint_scripts WHERE guid = %u", id);
|
||||
handler->PSendSysMessage("%s%s%u|r","|cff00ff00","Wp Event: Waypoint script removed: ", id);
|
||||
handler->PSendSysMessage("%s%s%u|r", "|cff00ff00", "Wp Event: Waypoint script removed: ", id);
|
||||
}
|
||||
else
|
||||
handler->PSendSysMessage("|cffff33ffWp Event: ERROR: you have selected a non existing script: %u|r", id);
|
||||
@@ -345,7 +345,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
char* arg_2 = strtok(NULL," ");
|
||||
char* arg_2 = strtok(NULL, " ");
|
||||
|
||||
if (!arg_2)
|
||||
{
|
||||
@@ -365,7 +365,7 @@ public:
|
||||
|
||||
char* arg_3;
|
||||
std::string arg_str_2 = arg_2;
|
||||
arg_3 = strtok(NULL," ");
|
||||
arg_3 = strtok(NULL, " ");
|
||||
|
||||
if (!arg_3)
|
||||
{
|
||||
@@ -378,13 +378,13 @@ public:
|
||||
if (arg_str_2 == "setid")
|
||||
{
|
||||
uint32 newid = atoi(arg_3);
|
||||
handler->PSendSysMessage("%s%s|r|cff00ffff%u|r|cff00ff00%s|r|cff00ffff%u|r","|cff00ff00","Wp Event: Wypoint scipt guid: ", newid," id changed: ", id);
|
||||
handler->PSendSysMessage("%s%s|r|cff00ffff%u|r|cff00ff00%s|r|cff00ffff%u|r", "|cff00ff00", "Wp Event: Wypoint scipt guid: ", newid, " id changed: ", id);
|
||||
WorldDatabase.PExecute("UPDATE waypoint_scripts SET id='%u' WHERE guid='%u'",
|
||||
newid, id); return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
QueryResult result = WorldDatabase.PQuery("SELECT id FROM waypoint_scripts WHERE guid='%u'",id);
|
||||
QueryResult result = WorldDatabase.PQuery("SELECT id FROM waypoint_scripts WHERE guid='%u'", id);
|
||||
|
||||
if (!result)
|
||||
{
|
||||
@@ -439,7 +439,7 @@ public:
|
||||
arg_2, arg_str_3.c_str(), id);
|
||||
}
|
||||
}
|
||||
handler->PSendSysMessage("%s%s|r|cff00ffff%u:|r|cff00ff00 %s %s|r","|cff00ff00","Waypoint script:", id, arg_2,"updated.");
|
||||
handler->PSendSysMessage("%s%s|r|cff00ffff%u:|r|cff00ff00 %s %s|r", "|cff00ff00", "Waypoint script:", id, arg_2, "updated.");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -599,7 +599,7 @@ public:
|
||||
//sMapMgr->GetMap(npcCreature->GetMapId())->Add(wpCreature2);
|
||||
}
|
||||
|
||||
WorldDatabase.PExecute("UPDATE waypoint_data SET position_x = '%f',position_y = '%f',position_z = '%f' where id = '%u' AND point='%u'",
|
||||
WorldDatabase.PExecute("UPDATE waypoint_data SET position_x = '%f', position_y = '%f', position_z = '%f' where id = '%u' AND point='%u'",
|
||||
chr->GetPositionX(), chr->GetPositionY(), chr->GetPositionZ(), pathid, point);
|
||||
|
||||
handler->PSendSysMessage(LANG_WAYPOINT_CHANGED);
|
||||
@@ -719,7 +719,7 @@ public:
|
||||
|
||||
if (show == "on")
|
||||
{
|
||||
QueryResult result = WorldDatabase.PQuery("SELECT point, position_x,position_y,position_z FROM waypoint_data WHERE id = '%u'", pathid);
|
||||
QueryResult result = WorldDatabase.PQuery("SELECT point, position_x, position_y, position_z FROM waypoint_data WHERE id = '%u'", pathid);
|
||||
|
||||
if (!result)
|
||||
{
|
||||
@@ -740,7 +740,7 @@ public:
|
||||
{
|
||||
Field *fields = result2->Fetch();
|
||||
uint32 wpguid = fields[0].GetUInt32();
|
||||
Creature* pCreature = handler->GetSession()->GetPlayer()->GetMap()->GetCreature(MAKE_NEW_GUID(wpguid,VISUAL_WAYPOINT,HIGHGUID_UNIT));
|
||||
Creature* pCreature = handler->GetSession()->GetPlayer()->GetMap()->GetCreature(MAKE_NEW_GUID(wpguid, VISUAL_WAYPOINT, HIGHGUID_UNIT));
|
||||
|
||||
if (!pCreature)
|
||||
{
|
||||
@@ -793,7 +793,7 @@ public:
|
||||
|
||||
wpCreature->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), chr->GetPhaseMaskForSpawn());
|
||||
// To call _LoadGoods(); _LoadQuests(); CreateTrainerSpells();
|
||||
wpCreature->LoadFromDB(wpCreature->GetDBTableGUIDLow(),map);
|
||||
wpCreature->LoadFromDB(wpCreature->GetDBTableGUIDLow(), map);
|
||||
map->Add(wpCreature);
|
||||
|
||||
if (target)
|
||||
@@ -813,7 +813,7 @@ public:
|
||||
{
|
||||
handler->PSendSysMessage("|cff00ff00DEBUG: wp first, GUID: %u|r", pathid);
|
||||
|
||||
QueryResult result = WorldDatabase.PQuery("SELECT position_x,position_y,position_z FROM waypoint_data WHERE point='1' AND id = '%u'",pathid);
|
||||
QueryResult result = WorldDatabase.PQuery("SELECT position_x, position_y, position_z FROM waypoint_data WHERE point='1' AND id = '%u'", pathid);
|
||||
if (!result)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_WAYPOINT_NOTFOUND, pathid);
|
||||
@@ -832,7 +832,7 @@ public:
|
||||
Map *map = chr->GetMap();
|
||||
|
||||
Creature* pCreature = new Creature;
|
||||
if (!pCreature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT),map, chr->GetPhaseMaskForSpawn(), id, 0, 0, x, y, z, o))
|
||||
if (!pCreature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMaskForSpawn(), id, 0, 0, x, y, z, o))
|
||||
{
|
||||
handler->PSendSysMessage(LANG_WAYPOINT_VP_NOTCREATED, id);
|
||||
delete pCreature;
|
||||
@@ -856,13 +856,13 @@ public:
|
||||
{
|
||||
handler->PSendSysMessage("|cff00ff00DEBUG: wp last, PathID: |r|cff00ffff%u|r", pathid);
|
||||
|
||||
QueryResult result = WorldDatabase.PQuery("SELECT MAX(point) FROM waypoint_data WHERE id = '%u'",pathid);
|
||||
QueryResult result = WorldDatabase.PQuery("SELECT MAX(point) FROM waypoint_data WHERE id = '%u'", pathid);
|
||||
if (result)
|
||||
Maxpoint = (*result)[0].GetUInt32();
|
||||
else
|
||||
Maxpoint = 0;
|
||||
|
||||
result = WorldDatabase.PQuery("SELECT position_x,position_y,position_z FROM waypoint_data WHERE point ='%u' AND id = '%u'",Maxpoint, pathid);
|
||||
result = WorldDatabase.PQuery("SELECT position_x, position_y, position_z FROM waypoint_data WHERE point ='%u' AND id = '%u'", Maxpoint, pathid);
|
||||
if (!result)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_WAYPOINT_NOTFOUNDLAST, pathid);
|
||||
@@ -914,7 +914,7 @@ public:
|
||||
{
|
||||
Field *fields = result->Fetch();
|
||||
uint32 guid = fields[0].GetUInt32();
|
||||
Creature* pCreature = handler->GetSession()->GetPlayer()->GetMap()->GetCreature(MAKE_NEW_GUID(guid,VISUAL_WAYPOINT,HIGHGUID_UNIT));
|
||||
Creature* pCreature = handler->GetSession()->GetPlayer()->GetMap()->GetCreature(MAKE_NEW_GUID(guid, VISUAL_WAYPOINT, HIGHGUID_UNIT));
|
||||
if (!pCreature)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_WAYPOINT_NOTREMOVED, guid);
|
||||
|
||||
@@ -72,12 +72,12 @@ class mob_av_marshal_or_warmaster : public CreatureScript
|
||||
|
||||
void Reset()
|
||||
{
|
||||
uiChargeTimer = urand(2*IN_MILLISECONDS,12*IN_MILLISECONDS);
|
||||
uiCleaveTimer = urand(1*IN_MILLISECONDS,11*IN_MILLISECONDS);
|
||||
uiDemoralizingShoutTimer = urand(2*IN_MILLISECONDS,2*IN_MILLISECONDS);
|
||||
uiWhirlwind1Timer = urand(1*IN_MILLISECONDS,12*IN_MILLISECONDS);
|
||||
uiWhirlwind2Timer = urand(5*IN_MILLISECONDS,20*IN_MILLISECONDS);
|
||||
uiEnrageTimer = urand(5*IN_MILLISECONDS,20*IN_MILLISECONDS);
|
||||
uiChargeTimer = urand(2*IN_MILLISECONDS, 12*IN_MILLISECONDS);
|
||||
uiCleaveTimer = urand(1*IN_MILLISECONDS, 11*IN_MILLISECONDS);
|
||||
uiDemoralizingShoutTimer = urand(2*IN_MILLISECONDS, 2*IN_MILLISECONDS);
|
||||
uiWhirlwind1Timer = urand(1*IN_MILLISECONDS, 12*IN_MILLISECONDS);
|
||||
uiWhirlwind2Timer = urand(5*IN_MILLISECONDS, 20*IN_MILLISECONDS);
|
||||
uiEnrageTimer = urand(5*IN_MILLISECONDS, 20*IN_MILLISECONDS);
|
||||
uiResetTimer = 5*IN_MILLISECONDS;
|
||||
|
||||
bHasAura = false;
|
||||
@@ -95,28 +95,28 @@ class mob_av_marshal_or_warmaster : public CreatureScript
|
||||
switch(me->GetEntry())
|
||||
{
|
||||
case NPC_NORTH_MARSHAL:
|
||||
DoCast(me,SPELL_NORTH_MARSHAL);
|
||||
DoCast(me, SPELL_NORTH_MARSHAL);
|
||||
break;
|
||||
case NPC_SOUTH_MARSHAL:
|
||||
DoCast(me,SPELL_SOUTH_MARSHAL);
|
||||
DoCast(me, SPELL_SOUTH_MARSHAL);
|
||||
break;
|
||||
case NPC_STONEHEARTH_MARSHAL:
|
||||
DoCast(me,SPELL_STONEHEARTH_MARSHAL);
|
||||
DoCast(me, SPELL_STONEHEARTH_MARSHAL);
|
||||
break;
|
||||
case NPC_ICEWING_MARSHAL:
|
||||
DoCast(me,SPELL_ICEWING_MARSHAL);
|
||||
DoCast(me, SPELL_ICEWING_MARSHAL);
|
||||
break;
|
||||
case NPC_EAST_FROSTWOLF_WARMASTER:
|
||||
DoCast(me,SPELL_EAST_FROSTWOLF_WARMASTER);
|
||||
DoCast(me, SPELL_EAST_FROSTWOLF_WARMASTER);
|
||||
break;
|
||||
case NPC_WEST_FROSTWOLF_WARMASTER:
|
||||
DoCast(me,SPELL_WEST_FROSTWOLF_WARMASTER);
|
||||
DoCast(me, SPELL_WEST_FROSTWOLF_WARMASTER);
|
||||
break;
|
||||
case NPC_ICEBLOOD_WARMASTER:
|
||||
DoCast(me,SPELL_ICEBLOOD_WARMASTER);
|
||||
DoCast(me, SPELL_ICEBLOOD_WARMASTER);
|
||||
break;
|
||||
case NPC_TOWER_POINT_WARMASTER:
|
||||
DoCast(me,SPELL_TOWER_POINT_WARMASTER);
|
||||
DoCast(me, SPELL_TOWER_POINT_WARMASTER);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -129,37 +129,37 @@ class mob_av_marshal_or_warmaster : public CreatureScript
|
||||
if (uiChargeTimer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_CHARGE);
|
||||
uiChargeTimer = urand(10*IN_MILLISECONDS,25*IN_MILLISECONDS);
|
||||
uiChargeTimer = urand(10*IN_MILLISECONDS, 25*IN_MILLISECONDS);
|
||||
} else uiChargeTimer -= diff;
|
||||
|
||||
if (uiCleaveTimer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_CLEAVE);
|
||||
uiCleaveTimer = urand(10*IN_MILLISECONDS,16*IN_MILLISECONDS);
|
||||
uiCleaveTimer = urand(10*IN_MILLISECONDS, 16*IN_MILLISECONDS);
|
||||
} else uiCleaveTimer -= diff;
|
||||
|
||||
if (uiDemoralizingShoutTimer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_DEMORALIZING_SHOUT);
|
||||
uiDemoralizingShoutTimer = urand(10*IN_MILLISECONDS,15*IN_MILLISECONDS);
|
||||
uiDemoralizingShoutTimer = urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS);
|
||||
} else uiDemoralizingShoutTimer -= diff;
|
||||
|
||||
if (uiWhirlwind1Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_WHIRLWIND1);
|
||||
uiWhirlwind1Timer = urand(6*IN_MILLISECONDS,20*IN_MILLISECONDS);
|
||||
uiWhirlwind1Timer = urand(6*IN_MILLISECONDS, 20*IN_MILLISECONDS);
|
||||
} else uiWhirlwind1Timer -= diff;
|
||||
|
||||
if (uiWhirlwind2Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_WHIRLWIND2);
|
||||
uiWhirlwind2Timer = urand(10*IN_MILLISECONDS,25*IN_MILLISECONDS);
|
||||
uiWhirlwind2Timer = urand(10*IN_MILLISECONDS, 25*IN_MILLISECONDS);
|
||||
} else uiWhirlwind2Timer -= diff;
|
||||
|
||||
if (uiEnrageTimer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_ENRAGE);
|
||||
uiEnrageTimer = urand(10*IN_MILLISECONDS,30*IN_MILLISECONDS);
|
||||
uiEnrageTimer = urand(10*IN_MILLISECONDS, 30*IN_MILLISECONDS);
|
||||
}else uiEnrageTimer -= diff;
|
||||
|
||||
// check if creature is not outside of building
|
||||
|
||||
@@ -110,7 +110,7 @@ public:
|
||||
|
||||
void Reset()
|
||||
{
|
||||
uiArcaneExplosionTimer = urand(5*IN_MILLISECONDS,15*IN_MILLISECONDS);
|
||||
uiArcaneExplosionTimer = urand(5*IN_MILLISECONDS, 15*IN_MILLISECONDS);
|
||||
uiConeOfColdTimer = 8*IN_MILLISECONDS;
|
||||
uiFireBoltTimer = 1*IN_MILLISECONDS;
|
||||
uiFrostboltTimer = 4*IN_MILLISECONDS;
|
||||
@@ -133,7 +133,7 @@ public:
|
||||
void JustSummoned(Creature* summoned)
|
||||
{
|
||||
CAST_AI(mob_water_elemental::mob_water_elementalAI, summoned->AI())->uiBalindaGUID = me->GetGUID();
|
||||
summoned->AI()->AttackStart(SelectTarget(SELECT_TARGET_RANDOM,0, 50, true));
|
||||
summoned->AI()->AttackStart(SelectTarget(SELECT_TARGET_RANDOM, 0, 50, true));
|
||||
summoned->setFaction(me->getFaction());
|
||||
Summons.Summon(summoned);
|
||||
}
|
||||
@@ -158,25 +158,25 @@ public:
|
||||
if (uiArcaneExplosionTimer < diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_ARCANE_EXPLOSION);
|
||||
uiArcaneExplosionTimer = urand(5*IN_MILLISECONDS,15*IN_MILLISECONDS);
|
||||
uiArcaneExplosionTimer = urand(5*IN_MILLISECONDS, 15*IN_MILLISECONDS);
|
||||
} else uiArcaneExplosionTimer -= diff;
|
||||
|
||||
if (uiConeOfColdTimer < diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_CONE_OF_COLD);
|
||||
uiConeOfColdTimer = urand(10*IN_MILLISECONDS,20*IN_MILLISECONDS);
|
||||
uiConeOfColdTimer = urand(10*IN_MILLISECONDS, 20*IN_MILLISECONDS);
|
||||
} else uiConeOfColdTimer -= diff;
|
||||
|
||||
if (uiFireBoltTimer < diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_FIREBALL);
|
||||
uiFireBoltTimer = urand(5*IN_MILLISECONDS,9*IN_MILLISECONDS);
|
||||
uiFireBoltTimer = urand(5*IN_MILLISECONDS, 9*IN_MILLISECONDS);
|
||||
} else uiFireBoltTimer -= diff;
|
||||
|
||||
if (uiFrostboltTimer < diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_FROSTBOLT);
|
||||
uiFrostboltTimer = urand(4*IN_MILLISECONDS,12*IN_MILLISECONDS);
|
||||
uiFrostboltTimer = urand(4*IN_MILLISECONDS, 12*IN_MILLISECONDS);
|
||||
} else uiFrostboltTimer -= diff;
|
||||
|
||||
// check if creature is not outside of building
|
||||
|
||||
@@ -59,12 +59,12 @@ public:
|
||||
|
||||
void Reset()
|
||||
{
|
||||
uiWhirlwindTimer = urand(1*IN_MILLISECONDS,20*IN_MILLISECONDS);
|
||||
uiWhirlwind2Timer = urand(1*IN_MILLISECONDS,20*IN_MILLISECONDS);
|
||||
uiWhirlwindTimer = urand(1*IN_MILLISECONDS, 20*IN_MILLISECONDS);
|
||||
uiWhirlwind2Timer = urand(1*IN_MILLISECONDS, 20*IN_MILLISECONDS);
|
||||
uiKnockdownTimer = 12*IN_MILLISECONDS;
|
||||
uiFrenzyTimer = 6*IN_MILLISECONDS;
|
||||
uiResetTimer = 5*IN_MILLISECONDS;
|
||||
uiYellTimer = urand(20*IN_MILLISECONDS,30*IN_MILLISECONDS); //20 to 30 seconds
|
||||
uiYellTimer = urand(20*IN_MILLISECONDS, 30*IN_MILLISECONDS); //20 to 30 seconds
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
@@ -86,31 +86,31 @@ public:
|
||||
if (uiWhirlwindTimer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_WHIRLWIND);
|
||||
uiWhirlwindTimer = urand(8*IN_MILLISECONDS,18*IN_MILLISECONDS);
|
||||
uiWhirlwindTimer = urand(8*IN_MILLISECONDS, 18*IN_MILLISECONDS);
|
||||
} else uiWhirlwindTimer -= diff;
|
||||
|
||||
if (uiWhirlwind2Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_WHIRLWIND2);
|
||||
uiWhirlwind2Timer = urand(7*IN_MILLISECONDS,25*IN_MILLISECONDS);
|
||||
uiWhirlwind2Timer = urand(7*IN_MILLISECONDS, 25*IN_MILLISECONDS);
|
||||
} else uiWhirlwind2Timer -= diff;
|
||||
|
||||
if (uiKnockdownTimer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_KNOCKDOWN);
|
||||
uiKnockdownTimer = urand(10*IN_MILLISECONDS,15*IN_MILLISECONDS);
|
||||
uiKnockdownTimer = urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS);
|
||||
} else uiKnockdownTimer -= diff;
|
||||
|
||||
if (uiFrenzyTimer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_FRENZY);
|
||||
uiFrenzyTimer = urand(20*IN_MILLISECONDS,30*IN_MILLISECONDS);
|
||||
uiFrenzyTimer = urand(20*IN_MILLISECONDS, 30*IN_MILLISECONDS);
|
||||
} else uiFrenzyTimer -= diff;
|
||||
|
||||
if (uiYellTimer <= diff)
|
||||
{
|
||||
DoScriptText(RAND(YELL_RANDOM1,YELL_RANDOM2,YELL_RANDOM3,YELL_RANDOM4,YELL_RANDOM5), me);
|
||||
uiYellTimer = urand(20*IN_MILLISECONDS,30*IN_MILLISECONDS); //20 to 30 seconds
|
||||
DoScriptText(RAND(YELL_RANDOM1, YELL_RANDOM2, YELL_RANDOM3, YELL_RANDOM4, YELL_RANDOM5), me);
|
||||
uiYellTimer = urand(20*IN_MILLISECONDS, 30*IN_MILLISECONDS); //20 to 30 seconds
|
||||
} else uiYellTimer -= diff;
|
||||
|
||||
// check if creature is not outside of building
|
||||
|
||||
@@ -50,11 +50,11 @@ public:
|
||||
|
||||
void Reset()
|
||||
{
|
||||
uiCleaveTimer = urand(1*IN_MILLISECONDS,9*IN_MILLISECONDS);
|
||||
uiFrighteningShoutTimer = urand(2*IN_MILLISECONDS,19*IN_MILLISECONDS);
|
||||
uiWhirlwind1Timer = urand(1*IN_MILLISECONDS,13*IN_MILLISECONDS);
|
||||
uiWhirlwind2Timer = urand(5*IN_MILLISECONDS,20*IN_MILLISECONDS);
|
||||
uiMortalStrikeTimer = urand(5*IN_MILLISECONDS,20*IN_MILLISECONDS);
|
||||
uiCleaveTimer = urand(1*IN_MILLISECONDS, 9*IN_MILLISECONDS);
|
||||
uiFrighteningShoutTimer = urand(2*IN_MILLISECONDS, 19*IN_MILLISECONDS);
|
||||
uiWhirlwind1Timer = urand(1*IN_MILLISECONDS, 13*IN_MILLISECONDS);
|
||||
uiWhirlwind2Timer = urand(5*IN_MILLISECONDS, 20*IN_MILLISECONDS);
|
||||
uiMortalStrikeTimer = urand(5*IN_MILLISECONDS, 20*IN_MILLISECONDS);
|
||||
uiResetTimer = 5*IN_MILLISECONDS;
|
||||
}
|
||||
|
||||
@@ -76,31 +76,31 @@ public:
|
||||
if (uiCleaveTimer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_CLEAVE);
|
||||
uiCleaveTimer = urand(10*IN_MILLISECONDS,16*IN_MILLISECONDS);
|
||||
uiCleaveTimer = urand(10*IN_MILLISECONDS, 16*IN_MILLISECONDS);
|
||||
} else uiCleaveTimer -= diff;
|
||||
|
||||
if (uiFrighteningShoutTimer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_FRIGHTENING_SHOUT);
|
||||
uiFrighteningShoutTimer = urand(10*IN_MILLISECONDS,15*IN_MILLISECONDS);
|
||||
uiFrighteningShoutTimer = urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS);
|
||||
} else uiFrighteningShoutTimer -= diff;
|
||||
|
||||
if (uiWhirlwind1Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_WHIRLWIND1);
|
||||
uiWhirlwind1Timer = urand(6*IN_MILLISECONDS,10*IN_MILLISECONDS);
|
||||
uiWhirlwind1Timer = urand(6*IN_MILLISECONDS, 10*IN_MILLISECONDS);
|
||||
} else uiWhirlwind1Timer -= diff;
|
||||
|
||||
if (uiWhirlwind2Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_WHIRLWIND2);
|
||||
uiWhirlwind2Timer = urand(10*IN_MILLISECONDS,25*IN_MILLISECONDS);
|
||||
uiWhirlwind2Timer = urand(10*IN_MILLISECONDS, 25*IN_MILLISECONDS);
|
||||
} else uiWhirlwind2Timer -= diff;
|
||||
|
||||
if (uiMortalStrikeTimer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_MORTAL_STRIKE);
|
||||
uiMortalStrikeTimer = urand(10*IN_MILLISECONDS,30*IN_MILLISECONDS);
|
||||
uiMortalStrikeTimer = urand(10*IN_MILLISECONDS, 30*IN_MILLISECONDS);
|
||||
} else uiMortalStrikeTimer -= diff;
|
||||
|
||||
// check if creature is not outside of building
|
||||
|
||||
@@ -60,7 +60,7 @@ public:
|
||||
uiThunderclapTimer = 4*IN_MILLISECONDS;
|
||||
uiStormboltTimer = 6*IN_MILLISECONDS;
|
||||
uiResetTimer = 5*IN_MILLISECONDS;
|
||||
uiYellTimer = urand(20*IN_MILLISECONDS,30*IN_MILLISECONDS);
|
||||
uiYellTimer = urand(20*IN_MILLISECONDS, 30*IN_MILLISECONDS);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
void JustRespawned()
|
||||
{
|
||||
Reset();
|
||||
DoScriptText(RAND(YELL_RESPAWN1,YELL_RESPAWN2), me);
|
||||
DoScriptText(RAND(YELL_RESPAWN1, YELL_RESPAWN2), me);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -82,25 +82,25 @@ public:
|
||||
if (uiAvatarTimer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_AVATAR);
|
||||
uiAvatarTimer = urand(15*IN_MILLISECONDS,20*IN_MILLISECONDS);
|
||||
uiAvatarTimer = urand(15*IN_MILLISECONDS, 20*IN_MILLISECONDS);
|
||||
} else uiAvatarTimer -= diff;
|
||||
|
||||
if (uiThunderclapTimer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_THUNDERCLAP);
|
||||
uiThunderclapTimer = urand(5*IN_MILLISECONDS,15*IN_MILLISECONDS);
|
||||
uiThunderclapTimer = urand(5*IN_MILLISECONDS, 15*IN_MILLISECONDS);
|
||||
} else uiThunderclapTimer -= diff;
|
||||
|
||||
if (uiStormboltTimer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_STORMBOLT);
|
||||
uiStormboltTimer = urand(10*IN_MILLISECONDS,25*IN_MILLISECONDS);
|
||||
uiStormboltTimer = urand(10*IN_MILLISECONDS, 25*IN_MILLISECONDS);
|
||||
} else uiStormboltTimer -= diff;
|
||||
|
||||
if (uiYellTimer <= diff)
|
||||
{
|
||||
DoScriptText(RAND(YELL_RANDOM1,YELL_RANDOM2,YELL_RANDOM3,YELL_RANDOM4,YELL_RANDOM5,YELL_RANDOM6,YELL_RANDOM7), me);
|
||||
uiYellTimer = urand(20*IN_MILLISECONDS,30*IN_MILLISECONDS); //20 to 30 seconds
|
||||
DoScriptText(RAND(YELL_RANDOM1, YELL_RANDOM2, YELL_RANDOM3, YELL_RANDOM4, YELL_RANDOM5, YELL_RANDOM6, YELL_RANDOM7), me);
|
||||
uiYellTimer = urand(20*IN_MILLISECONDS, 30*IN_MILLISECONDS); //20 to 30 seconds
|
||||
} else uiYellTimer -= diff;
|
||||
|
||||
// check if creature is not outside of building
|
||||
|
||||
@@ -113,8 +113,8 @@ public:
|
||||
if (pInstance->GetData(TYPE_RING_OF_LAW) == IN_PROGRESS || pInstance->GetData(TYPE_RING_OF_LAW) == DONE)
|
||||
return false;
|
||||
|
||||
pInstance->SetData(TYPE_RING_OF_LAW,IN_PROGRESS);
|
||||
pPlayer->SummonCreature(NPC_GRIMSTONE,625.559f,-205.618f,-52.735f,2.609f,TEMPSUMMON_DEAD_DESPAWN,0);
|
||||
pInstance->SetData(TYPE_RING_OF_LAW, IN_PROGRESS);
|
||||
pPlayer->SummonCreature(NPC_GRIMSTONE, 625.559f, -205.618f, -52.735f, 2.609f, TEMPSUMMON_DEAD_DESPAWN, 0);
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -191,7 +191,7 @@ public:
|
||||
//TODO: move them to center
|
||||
void SummonRingMob()
|
||||
{
|
||||
if (Creature* tmp = me->SummonCreature(RingMob[MobSpawnId],608.960f,-235.322f,-53.907f,1.857f,TEMPSUMMON_DEAD_DESPAWN,0))
|
||||
if (Creature* tmp = me->SummonCreature(RingMob[MobSpawnId], 608.960f, -235.322f, -53.907f, 1.857f, TEMPSUMMON_DEAD_DESPAWN, 0))
|
||||
RingMobGUID[MobCount] = tmp->GetGUID();
|
||||
|
||||
++MobCount;
|
||||
@@ -203,7 +203,7 @@ public:
|
||||
//TODO: move them to center
|
||||
void SummonRingBoss()
|
||||
{
|
||||
if (Creature* tmp = me->SummonCreature(RingBoss[rand()%6],644.300f,-175.989f,-53.739f,3.418f,TEMPSUMMON_DEAD_DESPAWN,0))
|
||||
if (Creature* tmp = me->SummonCreature(RingBoss[rand()%6], 644.300f, -175.989f, -53.739f, 3.418f, TEMPSUMMON_DEAD_DESPAWN, 0))
|
||||
RingBossGUID = tmp->GetGUID();
|
||||
|
||||
MobDeath_Timer = 2500;
|
||||
@@ -238,7 +238,7 @@ public:
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->UpdateEncounterState(ENCOUNTER_CREDIT_KILL_CREATURE, NPC_GRIMSTONE, me);
|
||||
pInstance->SetData(TYPE_RING_OF_LAW,DONE);
|
||||
pInstance->SetData(TYPE_RING_OF_LAW, DONE);
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: npc_grimstone: event reached end and set complete.");
|
||||
}
|
||||
break;
|
||||
@@ -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;
|
||||
@@ -626,9 +626,9 @@ public:
|
||||
{
|
||||
npc_dughal_stormwingAI* dughal_stormwingAI = new npc_dughal_stormwingAI(pCreature);
|
||||
|
||||
dughal_stormwingAI->AddWaypoint(0, 280.42f,-82.86f, -77.12f,0);
|
||||
dughal_stormwingAI->AddWaypoint(1, 287.64f,-87.01f, -76.79f,0);
|
||||
dughal_stormwingAI->AddWaypoint(2, 354.63f,-64.95f, -67.53f,0);
|
||||
dughal_stormwingAI->AddWaypoint(0, 280.42f, -82.86f, -77.12f, 0);
|
||||
dughal_stormwingAI->AddWaypoint(1, 287.64f, -87.01f, -76.79f, 0);
|
||||
dughal_stormwingAI->AddWaypoint(2, 354.63f, -64.95f, -67.53f, 0);
|
||||
|
||||
return dughal_stormwingAI;
|
||||
}
|
||||
@@ -641,7 +641,7 @@ public:
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
CAST_AI(npc_escort::npc_escortAI, (pCreature->AI()))->Start(false, true, pPlayer->GetGUID());
|
||||
pCreature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
pInstance->SetData(DATA_QUEST_JAIL_BREAK,ENCOUNTER_STATE_IN_PROGRESS);
|
||||
pInstance->SetData(DATA_QUEST_JAIL_BREAK, ENCOUNTER_STATE_IN_PROGRESS);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -665,12 +665,12 @@ public:
|
||||
switch(i)
|
||||
{
|
||||
case 0:me->Say(SAY_DUGHAL_FREE, LANG_UNIVERSAL, PlayerGUID); break;
|
||||
case 1:pInstance->SetData(DATA_DUGHAL,ENCOUNTER_STATE_OBJECTIVE_COMPLETED);break;
|
||||
case 1:pInstance->SetData(DATA_DUGHAL, ENCOUNTER_STATE_OBJECTIVE_COMPLETED);break;
|
||||
case 2:
|
||||
me->SetVisibility(VISIBILITY_OFF);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
pInstance->SetData(DATA_DUGHAL,ENCOUNTER_STATE_ENDED);
|
||||
pInstance->SetData(DATA_DUGHAL, ENCOUNTER_STATE_ENDED);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -685,7 +685,7 @@ public:
|
||||
me->SetVisibility(VISIBILITY_OFF);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
pInstance->SetData(DATA_DUGHAL,ENCOUNTER_STATE_ENDED);
|
||||
pInstance->SetData(DATA_DUGHAL, ENCOUNTER_STATE_ENDED);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -737,26 +737,26 @@ public:
|
||||
{
|
||||
npc_marshal_windsorAI* marshal_windsorAI = new npc_marshal_windsorAI(pCreature);
|
||||
|
||||
marshal_windsorAI->AddWaypoint(0, 316.336f,-225.528f, -77.7258f,7000);
|
||||
marshal_windsorAI->AddWaypoint(1, 316.336f,-225.528f, -77.7258f,2000);
|
||||
marshal_windsorAI->AddWaypoint(2, 322.96f,-207.13f, -77.87f,0);
|
||||
marshal_windsorAI->AddWaypoint(3, 281.05f,-172.16f, -75.12f,0);
|
||||
marshal_windsorAI->AddWaypoint(4, 272.19f,-139.14f, -70.61f,0);
|
||||
marshal_windsorAI->AddWaypoint(5, 283.62f,-116.09f, -70.21f,0);
|
||||
marshal_windsorAI->AddWaypoint(6, 296.18f,-94.30f, -74.08f,0);
|
||||
marshal_windsorAI->AddWaypoint(7, 294.57f,-93.11f, -74.08f,0);
|
||||
marshal_windsorAI->AddWaypoint(8, 314.31f,-74.31f, -76.09f,0);
|
||||
marshal_windsorAI->AddWaypoint(9, 360.22f,-62.93f, -66.77f,0);
|
||||
marshal_windsorAI->AddWaypoint(10, 383.38f,-69.40f, -63.25f,0);
|
||||
marshal_windsorAI->AddWaypoint(11, 389.99f,-67.86f, -62.57f,0);
|
||||
marshal_windsorAI->AddWaypoint(12, 400.98f,-72.01f, -62.31f,0);
|
||||
marshal_windsorAI->AddWaypoint(13, 404.22f,-62.30f, -63.50f,2300);
|
||||
marshal_windsorAI->AddWaypoint(14, 404.22f,-62.30f, -63.50f,1500);
|
||||
marshal_windsorAI->AddWaypoint(15, 407.65f,-51.86f, -63.96f,0);
|
||||
marshal_windsorAI->AddWaypoint(16, 403.61f,-51.71f, -63.92f,1000);
|
||||
marshal_windsorAI->AddWaypoint(17, 403.61f,-51.71f, -63.92f,2000);
|
||||
marshal_windsorAI->AddWaypoint(18, 403.61f,-51.71f, -63.92f,1000);
|
||||
marshal_windsorAI->AddWaypoint(19, 403.61f,-51.71f, -63.92f,0);
|
||||
marshal_windsorAI->AddWaypoint(0, 316.336f, -225.528f, -77.7258f, 7000);
|
||||
marshal_windsorAI->AddWaypoint(1, 316.336f, -225.528f, -77.7258f, 2000);
|
||||
marshal_windsorAI->AddWaypoint(2, 322.96f, -207.13f, -77.87f, 0);
|
||||
marshal_windsorAI->AddWaypoint(3, 281.05f, -172.16f, -75.12f, 0);
|
||||
marshal_windsorAI->AddWaypoint(4, 272.19f, -139.14f, -70.61f, 0);
|
||||
marshal_windsorAI->AddWaypoint(5, 283.62f, -116.09f, -70.21f, 0);
|
||||
marshal_windsorAI->AddWaypoint(6, 296.18f, -94.30f, -74.08f, 0);
|
||||
marshal_windsorAI->AddWaypoint(7, 294.57f, -93.11f, -74.08f, 0);
|
||||
marshal_windsorAI->AddWaypoint(8, 314.31f, -74.31f, -76.09f, 0);
|
||||
marshal_windsorAI->AddWaypoint(9, 360.22f, -62.93f, -66.77f, 0);
|
||||
marshal_windsorAI->AddWaypoint(10, 383.38f, -69.40f, -63.25f, 0);
|
||||
marshal_windsorAI->AddWaypoint(11, 389.99f, -67.86f, -62.57f, 0);
|
||||
marshal_windsorAI->AddWaypoint(12, 400.98f, -72.01f, -62.31f, 0);
|
||||
marshal_windsorAI->AddWaypoint(13, 404.22f, -62.30f, -63.50f, 2300);
|
||||
marshal_windsorAI->AddWaypoint(14, 404.22f, -62.30f, -63.50f, 1500);
|
||||
marshal_windsorAI->AddWaypoint(15, 407.65f, -51.86f, -63.96f, 0);
|
||||
marshal_windsorAI->AddWaypoint(16, 403.61f, -51.71f, -63.92f, 1000);
|
||||
marshal_windsorAI->AddWaypoint(17, 403.61f, -51.71f, -63.92f, 2000);
|
||||
marshal_windsorAI->AddWaypoint(18, 403.61f, -51.71f, -63.92f, 1000);
|
||||
marshal_windsorAI->AddWaypoint(19, 403.61f, -51.71f, -63.92f, 0);
|
||||
|
||||
return marshal_windsorAI;
|
||||
}
|
||||
@@ -768,7 +768,7 @@ public:
|
||||
if (pInstance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED)
|
||||
{
|
||||
CAST_AI(npc_escort::npc_escortAI, (pCreature->AI()))->Start(true, false, pPlayer->GetGUID());
|
||||
pInstance->SetData(DATA_QUEST_JAIL_BREAK,ENCOUNTER_STATE_IN_PROGRESS);
|
||||
pInstance->SetData(DATA_QUEST_JAIL_BREAK, ENCOUNTER_STATE_IN_PROGRESS);
|
||||
pCreature->setFaction(11);
|
||||
}
|
||||
|
||||
@@ -806,7 +806,7 @@ public:
|
||||
me->HandleEmoteCommand(EMOTE_STATE_USESTANDING);//EMOTE_STATE_WORK
|
||||
break;
|
||||
case 14:
|
||||
pInstance->SetData(DATA_GATE_SR,0);
|
||||
pInstance->SetData(DATA_GATE_SR, 0);
|
||||
me->setFaction(11);
|
||||
break;
|
||||
case 16:
|
||||
@@ -816,13 +816,13 @@ public:
|
||||
me->HandleEmoteCommand(EMOTE_STATE_USESTANDING);//EMOTE_STATE_WORK
|
||||
break;
|
||||
case 18:
|
||||
pInstance->SetData(DATA_GATE_SC,0);
|
||||
pInstance->SetData(DATA_GATE_SC, 0);
|
||||
break;
|
||||
case 19:
|
||||
me->SetVisibility(VISIBILITY_OFF);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SummonCreature(MOB_ENTRY_REGINALD_WINDSOR,403.61f,-51.71f,-63.92f,3.600434f,TEMPSUMMON_DEAD_DESPAWN ,0);
|
||||
me->SummonCreature(MOB_ENTRY_REGINALD_WINDSOR, 403.61f, -51.71f, -63.92f, 3.600434f, TEMPSUMMON_DEAD_DESPAWN , 0);
|
||||
pInstance->SetData(DATA_SUPPLY_ROOM, ENCOUNTER_STATE_ENDED);
|
||||
break;
|
||||
}
|
||||
@@ -830,7 +830,7 @@ public:
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
switch (urand(0,2))
|
||||
switch (urand(0, 2))
|
||||
{
|
||||
case 0: me->Say(SAY_WINDSOR_AGGRO1, LANG_UNIVERSAL, PlayerGUID); break;
|
||||
case 1: me->Say(SAY_WINDSOR_AGGRO2, LANG_UNIVERSAL, PlayerGUID); break;
|
||||
@@ -842,7 +842,7 @@ public:
|
||||
|
||||
void JustDied(Unit *slayer)
|
||||
{
|
||||
pInstance->SetData(DATA_QUEST_JAIL_BREAK,ENCOUNTER_STATE_FAILED);
|
||||
pInstance->SetData(DATA_QUEST_JAIL_BREAK, ENCOUNTER_STATE_FAILED);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -911,41 +911,41 @@ public:
|
||||
{
|
||||
npc_marshal_reginald_windsorAI* marshal_reginald_windsorAI = new npc_marshal_reginald_windsorAI(pCreature);
|
||||
|
||||
marshal_reginald_windsorAI->AddWaypoint(0, 403.61f,-52.71f, -63.92f,4000);
|
||||
marshal_reginald_windsorAI->AddWaypoint(1, 403.61f,-52.71f, -63.92f,4000);
|
||||
marshal_reginald_windsorAI->AddWaypoint(2, 406.33f,-54.87f, -63.95f,0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(3, 407.99f,-73.91f, -62.26f,0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(4, 557.03f,-119.71f, -61.83f,0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(5, 573.40f,-124.39f, -65.07f,0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(6, 593.91f,-130.29f, -69.25f,0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(7, 593.21f,-132.16f, -69.25f,0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(8, 593.21f,-132.16f, -69.25f,3000);
|
||||
marshal_reginald_windsorAI->AddWaypoint(9, 622.81f,-135.55f, -71.92f,0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(10, 634.68f,-151.29f, -70.32f,0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(11, 635.06f,-153.25f, -70.32f,0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(12, 635.06f,-153.25f, -70.32f,3000);
|
||||
marshal_reginald_windsorAI->AddWaypoint(13, 635.06f,-153.25f, -70.32f,1500);
|
||||
marshal_reginald_windsorAI->AddWaypoint(14, 655.25f,-172.39f, -73.72f,0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(15, 654.79f,-226.30f, -83.06f,0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(16, 622.85f,-268.85f, -83.96f,0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(17, 579.45f,-275.56f, -80.44f,0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(18, 561.19f,-266.85f, -75.59f,0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(19, 547.91f,-253.92f, -70.34f,0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(20, 549.20f,-252.40f, -70.34f,0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(21, 549.20f,-252.40f, -70.34f,4000);
|
||||
marshal_reginald_windsorAI->AddWaypoint(22, 555.33f,-269.16f, -74.40f,0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(23, 554.31f,-270.88f, -74.40f,0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(24, 554.31f,-270.88f, -74.40f,4000);
|
||||
marshal_reginald_windsorAI->AddWaypoint(25, 536.10f,-249.60f, -67.47f,0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(26, 520.94f,-216.65f, -59.28f,0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(27, 505.99f,-148.74f, -62.17f,0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(28, 484.21f,-56.24f, -62.43f,0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(29, 470.39f,-6.01f, -70.10f,0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(30, 451.27f,30.85f, -70.07f,0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(31, 452.45f,29.85f, -70.37f,1500);
|
||||
marshal_reginald_windsorAI->AddWaypoint(32, 452.45f,29.85f, -70.37f,7000);
|
||||
marshal_reginald_windsorAI->AddWaypoint(33, 452.45f,29.85f, -70.37f,10000);
|
||||
marshal_reginald_windsorAI->AddWaypoint(34, 451.27f,31.85f, -70.07f,0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(0, 403.61f, -52.71f, -63.92f, 4000);
|
||||
marshal_reginald_windsorAI->AddWaypoint(1, 403.61f, -52.71f, -63.92f, 4000);
|
||||
marshal_reginald_windsorAI->AddWaypoint(2, 406.33f, -54.87f, -63.95f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(3, 407.99f, -73.91f, -62.26f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(4, 557.03f, -119.71f, -61.83f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(5, 573.40f, -124.39f, -65.07f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(6, 593.91f, -130.29f, -69.25f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(7, 593.21f, -132.16f, -69.25f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(8, 593.21f, -132.16f, -69.25f, 3000);
|
||||
marshal_reginald_windsorAI->AddWaypoint(9, 622.81f, -135.55f, -71.92f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(10, 634.68f, -151.29f, -70.32f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(11, 635.06f, -153.25f, -70.32f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(12, 635.06f, -153.25f, -70.32f, 3000);
|
||||
marshal_reginald_windsorAI->AddWaypoint(13, 635.06f, -153.25f, -70.32f, 1500);
|
||||
marshal_reginald_windsorAI->AddWaypoint(14, 655.25f, -172.39f, -73.72f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(15, 654.79f, -226.30f, -83.06f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(16, 622.85f, -268.85f, -83.96f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(17, 579.45f, -275.56f, -80.44f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(18, 561.19f, -266.85f, -75.59f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(19, 547.91f, -253.92f, -70.34f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(20, 549.20f, -252.40f, -70.34f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(21, 549.20f, -252.40f, -70.34f, 4000);
|
||||
marshal_reginald_windsorAI->AddWaypoint(22, 555.33f, -269.16f, -74.40f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(23, 554.31f, -270.88f, -74.40f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(24, 554.31f, -270.88f, -74.40f, 4000);
|
||||
marshal_reginald_windsorAI->AddWaypoint(25, 536.10f, -249.60f, -67.47f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(26, 520.94f, -216.65f, -59.28f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(27, 505.99f, -148.74f, -62.17f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(28, 484.21f, -56.24f, -62.43f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(29, 470.39f, -6.01f, -70.10f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(30, 451.27f, 30.85f, -70.07f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(31, 452.45f, 29.85f, -70.37f, 1500);
|
||||
marshal_reginald_windsorAI->AddWaypoint(32, 452.45f, 29.85f, -70.37f, 7000);
|
||||
marshal_reginald_windsorAI->AddWaypoint(33, 452.45f, 29.85f, -70.37f, 10000);
|
||||
marshal_reginald_windsorAI->AddWaypoint(34, 451.27f, 31.85f, -70.07f, 0);
|
||||
|
||||
return marshal_reginald_windsorAI;
|
||||
}
|
||||
@@ -1035,7 +1035,7 @@ public:
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
switch (urand(0,2))
|
||||
switch (urand(0, 2))
|
||||
{
|
||||
case 0: me->Say(SAY_WINDSOR_AGGRO1, LANG_UNIVERSAL, PlayerGUID); break;
|
||||
case 1: me->Say(SAY_WINDSOR_AGGRO2, LANG_UNIVERSAL, PlayerGUID); break;
|
||||
@@ -1046,7 +1046,7 @@ public:
|
||||
|
||||
void JustDied(Unit *slayer)
|
||||
{
|
||||
pInstance->SetData(DATA_QUEST_JAIL_BREAK,ENCOUNTER_STATE_FAILED);
|
||||
pInstance->SetData(DATA_QUEST_JAIL_BREAK, ENCOUNTER_STATE_FAILED);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -1056,25 +1056,25 @@ public:
|
||||
{
|
||||
if (!pInstance->GetData(DATA_GATE_J) && pInstance->GetData(DATA_JAZ) == ENCOUNTER_STATE_NOT_STARTED)
|
||||
{
|
||||
pInstance->SetData(DATA_CREATURE_JAZ,1);
|
||||
pInstance->SetData(DATA_JAZ,ENCOUNTER_STATE_IN_PROGRESS);
|
||||
pInstance->SetData(DATA_CREATURE_JAZ, 1);
|
||||
pInstance->SetData(DATA_JAZ, ENCOUNTER_STATE_IN_PROGRESS);
|
||||
}
|
||||
if (pInstance->GetData(DATA_CREATURE_JAZ) && pInstance->GetData(DATA_CREATURE_OGRABISI) && pInstance->GetData(DATA_JAZ) == ENCOUNTER_STATE_IN_PROGRESS)
|
||||
{
|
||||
SetEscortPaused(false);
|
||||
pInstance->SetData(DATA_JAZ,ENCOUNTER_STATE_ENDED);
|
||||
pInstance->SetData(DATA_JAZ, ENCOUNTER_STATE_ENDED);
|
||||
}
|
||||
}
|
||||
else if (wp == 11)
|
||||
{
|
||||
if (!pInstance->GetData(DATA_GATE_S) && pInstance->GetData(DATA_SHILL) == ENCOUNTER_STATE_NOT_STARTED)
|
||||
{
|
||||
pInstance->SetData(DATA_CREATURE_SHILL,1);
|
||||
pInstance->SetData(DATA_SHILL,ENCOUNTER_STATE_IN_PROGRESS);
|
||||
pInstance->SetData(DATA_CREATURE_SHILL, 1);
|
||||
pInstance->SetData(DATA_SHILL, ENCOUNTER_STATE_IN_PROGRESS);
|
||||
}
|
||||
if (pInstance->GetData(DATA_CREATURE_SHILL) && pInstance->GetData(DATA_SHILL) == ENCOUNTER_STATE_IN_PROGRESS)
|
||||
{
|
||||
pInstance->SetData(DATA_SHILL,ENCOUNTER_STATE_ENDED);
|
||||
pInstance->SetData(DATA_SHILL, ENCOUNTER_STATE_ENDED);
|
||||
SetEscortPaused(false);
|
||||
}
|
||||
}
|
||||
@@ -1082,14 +1082,14 @@ public:
|
||||
{
|
||||
if (!pInstance->GetData(DATA_GATE_C) && pInstance->GetData(DATA_CREST) == ENCOUNTER_STATE_NOT_STARTED)
|
||||
{
|
||||
pInstance->SetData(DATA_CREATURE_CREST,1);
|
||||
pInstance->SetData(DATA_CREATURE_CREST, 1);
|
||||
me->Say(SAY_REGINALD_WINDSOR_13_2, LANG_UNIVERSAL, PlayerGUID);
|
||||
pInstance->SetData(DATA_CREST,ENCOUNTER_STATE_IN_PROGRESS);
|
||||
pInstance->SetData(DATA_CREST, ENCOUNTER_STATE_IN_PROGRESS);
|
||||
}
|
||||
if (pInstance->GetData(DATA_CREATURE_CREST) && pInstance->GetData(DATA_CREST) == ENCOUNTER_STATE_IN_PROGRESS)
|
||||
{
|
||||
SetEscortPaused(false);
|
||||
pInstance->SetData(DATA_CREST,ENCOUNTER_STATE_ENDED);
|
||||
pInstance->SetData(DATA_CREST, ENCOUNTER_STATE_ENDED);
|
||||
}
|
||||
}
|
||||
if (pInstance->GetData(DATA_TOBIAS) == ENCOUNTER_STATE_OBJECTIVE_COMPLETED) SetEscortPaused(false);
|
||||
@@ -1131,7 +1131,7 @@ public:
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
CAST_AI(npc_escort::npc_escortAI, (pCreature->AI()))->Start(false, true, pPlayer->GetGUID());
|
||||
pCreature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
pInstance->SetData(DATA_TOBIAS,ENCOUNTER_STATE_IN_PROGRESS);
|
||||
pInstance->SetData(DATA_TOBIAS, ENCOUNTER_STATE_IN_PROGRESS);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -1160,7 +1160,7 @@ public:
|
||||
me->SetVisibility(VISIBILITY_OFF);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
pInstance->SetData(DATA_TOBIAS,ENCOUNTER_STATE_ENDED);
|
||||
pInstance->SetData(DATA_TOBIAS, ENCOUNTER_STATE_ENDED);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1170,12 +1170,12 @@ public:
|
||||
{
|
||||
case 0:me->Say(SAY_TOBIAS_FREE, LANG_UNIVERSAL, PlayerGUID); break;
|
||||
case 2:
|
||||
pInstance->SetData(DATA_TOBIAS,ENCOUNTER_STATE_OBJECTIVE_COMPLETED);break;
|
||||
pInstance->SetData(DATA_TOBIAS, ENCOUNTER_STATE_OBJECTIVE_COMPLETED);break;
|
||||
case 4:
|
||||
me->SetVisibility(VISIBILITY_OFF);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
pInstance->SetData(DATA_TOBIAS,ENCOUNTER_STATE_ENDED);
|
||||
pInstance->SetData(DATA_TOBIAS, ENCOUNTER_STATE_ENDED);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1323,7 +1323,7 @@ public:
|
||||
{
|
||||
if (BreakKeg_Timer <= diff)
|
||||
{
|
||||
DoGo(DATA_GO_BAR_KEG,0);
|
||||
DoGo(DATA_GO_BAR_KEG, 0);
|
||||
BreakKeg_Timer = 0;
|
||||
BreakDoor_Timer = 1000;
|
||||
} else BreakKeg_Timer -= diff;
|
||||
@@ -1333,16 +1333,16 @@ public:
|
||||
{
|
||||
if (BreakDoor_Timer <= diff)
|
||||
{
|
||||
DoGo(DATA_GO_BAR_DOOR,2);
|
||||
DoGo(DATA_GO_BAR_KEG_TRAP,0); //doesn't work very well, leaving code here for future
|
||||
DoGo(DATA_GO_BAR_DOOR, 2);
|
||||
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.
|
||||
//optionally, DONE can trigger bar to go hostile.
|
||||
pInstance->SetData(TYPE_BAR,DONE);
|
||||
pInstance->SetData(TYPE_BAR, DONE);
|
||||
|
||||
BreakDoor_Timer = 0;
|
||||
} else BreakDoor_Timer -= diff;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ public:
|
||||
if (InstanceScript* pInstance = pCreature->GetInstanceScript())
|
||||
{
|
||||
//are 5 minutes expected? go template may have data to despawn when used at quest
|
||||
pInstance->DoRespawnGameObject(pInstance->GetData64(DATA_GO_CHALICE),MINUTE*5);
|
||||
pInstance->DoRespawnGameObject(pInstance->GetData64(DATA_GO_CHALICE), MINUTE*5);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -129,7 +129,7 @@ public:
|
||||
pCreature->AI()->AttackStart(pPlayer);
|
||||
InstanceScript* pInstance = pCreature->GetInstanceScript();
|
||||
if (pInstance)
|
||||
pInstance->SetData64(DATA_EVENSTARTER,pPlayer->GetGUID());
|
||||
pInstance->SetData64(DATA_EVENSTARTER, pPlayer->GetGUID());
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -386,8 +386,8 @@ public:
|
||||
|
||||
void TombOfSevenReset()
|
||||
{
|
||||
HandleGameObject(GoTombExitGUID,false);//event reseted, close exit door
|
||||
HandleGameObject(GoTombEnterGUID,true);//event reseted, open entrance door
|
||||
HandleGameObject(GoTombExitGUID, false);//event reseted, close exit door
|
||||
HandleGameObject(GoTombEnterGUID, true);//event reseted, open entrance door
|
||||
for (uint8 i = 0; i < 7; ++i)
|
||||
{
|
||||
if (Creature* boss = instance->GetCreature(TombBossGUIDs[i]))
|
||||
@@ -414,16 +414,16 @@ public:
|
||||
|
||||
void TombOfSevenStart()
|
||||
{
|
||||
HandleGameObject(GoTombExitGUID,false);//event started, close exit door
|
||||
HandleGameObject(GoTombEnterGUID,false);//event started, close entrance door
|
||||
HandleGameObject(GoTombExitGUID, false);//event started, close exit door
|
||||
HandleGameObject(GoTombEnterGUID, false);//event started, close entrance door
|
||||
SetData(TYPE_TOMB_OF_SEVEN, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void TombOfSevenEnd()
|
||||
{
|
||||
DoRespawnGameObject(GoChestGUID,DAY);
|
||||
HandleGameObject(GoTombExitGUID,true);//event done, open exit door
|
||||
HandleGameObject(GoTombEnterGUID,true);//event done, open entrance door
|
||||
DoRespawnGameObject(GoChestGUID, DAY);
|
||||
HandleGameObject(GoTombExitGUID, true);//event done, open exit door
|
||||
HandleGameObject(GoTombEnterGUID, true);//event done, open entrance door
|
||||
TombEventStarterGUID = 0;
|
||||
SetData(TYPE_TOMB_OF_SEVEN, DONE);
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ public:
|
||||
break;
|
||||
case EVENT_MOTHERS_MILK:
|
||||
DoCast(me, SPELL_MOTHERSMILK);
|
||||
events.ScheduleEvent(EVENT_MOTHERS_MILK, urand(5*IN_MILLISECONDS,12500));
|
||||
events.ScheduleEvent(EVENT_MOTHERS_MILK, urand(5*IN_MILLISECONDS, 12500));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,11 +89,11 @@ public:
|
||||
|
||||
if (!Summoned && HealthBelowPct(51))
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM,0, 100, true))
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
{
|
||||
if (Creature* warlord = me->SummonCreature(NPC_SPIRESTONE_WARLORD, SummonLocation1, TEMPSUMMON_TIMED_DESPAWN,300*IN_MILLISECONDS))
|
||||
if (Creature* warlord = me->SummonCreature(NPC_SPIRESTONE_WARLORD, SummonLocation1, TEMPSUMMON_TIMED_DESPAWN, 300*IN_MILLISECONDS))
|
||||
warlord->AI()->AttackStart(target);
|
||||
if (Creature* berserker = me->SummonCreature(NPC_SMOLDERTHORN_BERSERKER, SummonLocation2, TEMPSUMMON_TIMED_DESPAWN,300*IN_MILLISECONDS))
|
||||
if (Creature* berserker = me->SummonCreature(NPC_SMOLDERTHORN_BERSERKER, SummonLocation2, TEMPSUMMON_TIMED_DESPAWN, 300*IN_MILLISECONDS))
|
||||
berserker->AI()->AttackStart(target);
|
||||
Summoned = true;
|
||||
}
|
||||
|
||||
@@ -82,14 +82,14 @@ public:
|
||||
if (BlastWave_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_BLASTWAVE);
|
||||
BlastWave_Timer = urand(8000,16000);
|
||||
BlastWave_Timer = urand(8000, 16000);
|
||||
} else BlastWave_Timer -= diff;
|
||||
|
||||
//MortalStrike_Timer
|
||||
if (MortalStrike_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_MORTALSTRIKE);
|
||||
MortalStrike_Timer = urand(25000,35000);
|
||||
MortalStrike_Timer = urand(25000, 35000);
|
||||
} else MortalStrike_Timer -= diff;
|
||||
|
||||
if (KnockBack_Timer <= diff)
|
||||
@@ -97,9 +97,9 @@ public:
|
||||
DoCast(me->getVictim(), SPELL_KNOCKBACK);
|
||||
//Drop 50% aggro
|
||||
if (DoGetThreat(me->getVictim()))
|
||||
DoModifyThreatPercent(me->getVictim(),-50);
|
||||
DoModifyThreatPercent(me->getVictim(), -50);
|
||||
|
||||
KnockBack_Timer = urand(15000,30000);
|
||||
KnockBack_Timer = urand(15000, 30000);
|
||||
} else KnockBack_Timer -= diff;
|
||||
|
||||
if (EnterEvadeIfOutOfCombatArea(diff))
|
||||
|
||||
@@ -42,10 +42,10 @@ enum Spells
|
||||
SPELL_NATURE_VULNERABILITY = 22280,
|
||||
SPELL_ARCANE_VULNERABILITY = 22281,
|
||||
//Other spells
|
||||
SPELL_INCINERATE = 23308, //Incinerate 23308,23309
|
||||
SPELL_INCINERATE = 23308, //Incinerate 23308, 23309
|
||||
SPELL_TIMELAPSE = 23310, //Time lapse 23310, 23311(old threat mod that was removed in 2.01)
|
||||
SPELL_CORROSIVEACID = 23313, //Corrosive Acid 23313, 23314
|
||||
SPELL_IGNITEFLESH = 23315, //Ignite Flesh 23315,23316
|
||||
SPELL_IGNITEFLESH = 23315, //Ignite Flesh 23315, 23316
|
||||
SPELL_FROSTBURN = 23187, //Frost burn 23187, 23189
|
||||
//Brood Affliction 23173 - Scripted Spell that cycles through all targets within 100 yards and has a chance to cast one of the afflictions on them
|
||||
//Since Scripted spells arn't coded I'll just write a function that does the same thing
|
||||
@@ -77,7 +77,7 @@ public:
|
||||
//5 possiblities for the first breath, 4 for the second, 20 total possiblites
|
||||
//This way we don't end up casting 2 of the same breath
|
||||
//TL TL would be stupid
|
||||
switch (urand(0,19))
|
||||
switch (urand(0, 19))
|
||||
{
|
||||
//B1 - Incin
|
||||
case 0:
|
||||
@@ -284,7 +284,7 @@ public:
|
||||
{
|
||||
DoCast(me, SPELL_FRENZY);
|
||||
DoScriptText(EMOTE_FRENZY, me);
|
||||
Frenzy_Timer = urand(10000,15000);
|
||||
Frenzy_Timer = urand(10000, 15000);
|
||||
} else Frenzy_Timer -= diff;
|
||||
|
||||
//Enrage if not already enraged and below 20%
|
||||
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
if (ShadowFlame_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SHADOWFLAME);
|
||||
ShadowFlame_Timer = urand(12000,15000);
|
||||
ShadowFlame_Timer = urand(12000, 15000);
|
||||
} else ShadowFlame_Timer -= diff;
|
||||
|
||||
//Wing Buffet Timer
|
||||
@@ -85,7 +85,7 @@ public:
|
||||
if (ShadowOfEbonroc_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SHADOWOFEBONROC);
|
||||
ShadowOfEbonroc_Timer = urand(25000,350000);
|
||||
ShadowOfEbonroc_Timer = urand(25000, 350000);
|
||||
} else ShadowOfEbonroc_Timer -= diff;
|
||||
|
||||
if (me->getVictim()->HasAura(SPELL_SHADOWOFEBONROC))
|
||||
@@ -93,7 +93,7 @@ public:
|
||||
if (Heal_Timer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_HEAL);
|
||||
Heal_Timer = urand(1000,3000);
|
||||
Heal_Timer = urand(1000, 3000);
|
||||
} else Heal_Timer -= diff;
|
||||
}
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
if (ShadowFlame_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SHADOWFLAME);
|
||||
ShadowFlame_Timer = urand(15000,18000);
|
||||
ShadowFlame_Timer = urand(15000, 18000);
|
||||
} else ShadowFlame_Timer -= diff;
|
||||
|
||||
//WingBuffet_Timer
|
||||
@@ -76,7 +76,7 @@ public:
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_WINGBUFFET);
|
||||
if (DoGetThreat(me->getVictim()))
|
||||
DoModifyThreatPercent(me->getVictim(),-75);
|
||||
DoModifyThreatPercent(me->getVictim(), -75);
|
||||
|
||||
WingBuffet_Timer = 25000;
|
||||
} else WingBuffet_Timer -= diff;
|
||||
|
||||
@@ -78,7 +78,7 @@ public:
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_WINGBUFFET);
|
||||
if (DoGetThreat(me->getVictim()))
|
||||
DoModifyThreatPercent(me->getVictim(),-75);
|
||||
DoModifyThreatPercent(me->getVictim(), -75);
|
||||
|
||||
WingBuffet_Timer = 25000;
|
||||
} else WingBuffet_Timer -= diff;
|
||||
|
||||
@@ -112,7 +112,7 @@ public:
|
||||
|
||||
void EnterCombat(Unit * who)
|
||||
{
|
||||
DoScriptText(RAND(SAY_XHEALTH,SAY_AGGRO,SAY_SHADOWFLAME), me);
|
||||
DoScriptText(RAND(SAY_XHEALTH, SAY_AGGRO, SAY_SHADOWFLAME), me);
|
||||
|
||||
DoCast(who, SPELL_SHADOWFLAME_INITIAL);
|
||||
DoZoneInCombat();
|
||||
@@ -174,7 +174,7 @@ public:
|
||||
//On official it is based on what classes are currently on the hostil list
|
||||
//but we can't do that yet so just randomly call one
|
||||
|
||||
switch (urand(0,8))
|
||||
switch (urand(0, 8))
|
||||
{
|
||||
case 0:
|
||||
DoScriptText(SAY_MAGE, me);
|
||||
|
||||
@@ -83,21 +83,21 @@ public:
|
||||
if (Cleave_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_CLEAVE);
|
||||
Cleave_Timer = urand(7000,10000);
|
||||
Cleave_Timer = urand(7000, 10000);
|
||||
} else Cleave_Timer -= diff;
|
||||
|
||||
//WarStomp_Timer
|
||||
if (WarStomp_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_WARSTOMP);
|
||||
WarStomp_Timer = urand(15000,25000);
|
||||
WarStomp_Timer = urand(15000, 25000);
|
||||
} else WarStomp_Timer -= diff;
|
||||
|
||||
//FireballVolley_Timer
|
||||
if (FireballVolley_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_FIREBALLVOLLEY);
|
||||
FireballVolley_Timer = urand(12000,15000);
|
||||
FireballVolley_Timer = urand(12000, 15000);
|
||||
} else FireballVolley_Timer -= diff;
|
||||
|
||||
//Conflagration_Timer
|
||||
@@ -107,7 +107,7 @@ public:
|
||||
//We will remove this threat reduction and add an aura check.
|
||||
|
||||
//if (DoGetThreat(me->getVictim()))
|
||||
//DoModifyThreatPercent(me->getVictim(),-50);
|
||||
//DoModifyThreatPercent(me->getVictim(), -50);
|
||||
|
||||
Conflagration_Timer = 12000;
|
||||
} else Conflagration_Timer -= diff;
|
||||
|
||||
@@ -168,9 +168,9 @@ public:
|
||||
break;
|
||||
case 2:
|
||||
me->setFaction(103);
|
||||
if (PlayerGUID && Unit::GetUnit((*me),PlayerGUID))
|
||||
if (PlayerGUID && Unit::GetUnit((*me), PlayerGUID))
|
||||
{
|
||||
AttackStart(Unit::GetUnit((*me),PlayerGUID));
|
||||
AttackStart(Unit::GetUnit((*me), PlayerGUID));
|
||||
DoCast(me, SPELL_ESSENCEOFTHERED);
|
||||
}
|
||||
SpeechTimer = 0;
|
||||
@@ -202,7 +202,7 @@ public:
|
||||
if (FlameBreath_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_FLAMEBREATH);
|
||||
FlameBreath_Timer = urand(4000,8000);
|
||||
FlameBreath_Timer = urand(4000, 8000);
|
||||
} else FlameBreath_Timer -= diff;
|
||||
|
||||
//BurningAdrenalineCaster_Timer
|
||||
@@ -219,7 +219,7 @@ public:
|
||||
i = 3;
|
||||
}
|
||||
if (pTarget) // cast on self (see below)
|
||||
pTarget->CastSpell(pTarget,SPELL_BURNINGADRENALINE,1);
|
||||
pTarget->CastSpell(pTarget, SPELL_BURNINGADRENALINE, 1);
|
||||
|
||||
BurningAdrenalineCaster_Timer = 15000;
|
||||
} else BurningAdrenalineCaster_Timer -= diff;
|
||||
@@ -229,7 +229,7 @@ public:
|
||||
{
|
||||
// have the victim cast the spell on himself otherwise the third effect aura will be applied
|
||||
// to Vael instead of the player
|
||||
me->getVictim()->CastSpell(me->getVictim(),SPELL_BURNINGADRENALINE,1);
|
||||
me->getVictim()->CastSpell(me->getVictim(), SPELL_BURNINGADRENALINE, 1);
|
||||
|
||||
BurningAdrenalineTank_Timer = 45000;
|
||||
} else BurningAdrenalineTank_Timer -= diff;
|
||||
|
||||
@@ -113,7 +113,7 @@ public:
|
||||
boss_victor_nefariusAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
NefarianGUID = 0;
|
||||
switch (urand(0,19))
|
||||
switch (urand(0, 19))
|
||||
{
|
||||
case 0:
|
||||
DrakType1 = CREATURE_BRONZE_DRAKANOID;
|
||||
@@ -219,7 +219,7 @@ public:
|
||||
NefarianGUID = 0;
|
||||
NefCheckTime = 2000;
|
||||
|
||||
me->SetUInt32Value(UNIT_NPC_FLAGS,1);
|
||||
me->SetUInt32Value(UNIT_NPC_FLAGS, 1);
|
||||
me->setFaction(35);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
@@ -237,7 +237,7 @@ public:
|
||||
AttackStart((*i));
|
||||
}
|
||||
*/
|
||||
me->SetUInt32Value(UNIT_NPC_FLAGS,0);
|
||||
me->SetUInt32Value(UNIT_NPC_FLAGS, 0);
|
||||
me->setFaction(103);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
AttackStart(pTarget);
|
||||
@@ -272,7 +272,7 @@ public:
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(pTarget, SPELL_SHADOWBOLT);
|
||||
|
||||
ShadowBoltTimer = urand(3000,10000);
|
||||
ShadowBoltTimer = urand(3000, 10000);
|
||||
} else ShadowBoltTimer -= diff;
|
||||
|
||||
//FearTimer
|
||||
@@ -293,7 +293,7 @@ public:
|
||||
Unit *pTarget = NULL;
|
||||
|
||||
//1 in 3 chance it will be a chromatic
|
||||
if (urand(0,2) == 0)
|
||||
if (urand(0, 2) == 0)
|
||||
CreatureID = CREATURE_CHROMATIC_DRAKANOID;
|
||||
else
|
||||
CreatureID = DrakType1;
|
||||
@@ -301,7 +301,7 @@ public:
|
||||
++SpawnedAdds;
|
||||
|
||||
//Spawn Creature and force it to start attacking a random target
|
||||
Spawned = me->SummonCreature(CreatureID,ADD_X1,ADD_Y1,ADD_Z1,5.000f,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,5000);
|
||||
Spawned = me->SummonCreature(CreatureID, ADD_X1, ADD_Y1, ADD_Z1, 5.000f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
|
||||
if (pTarget && Spawned)
|
||||
{
|
||||
@@ -310,14 +310,14 @@ public:
|
||||
}
|
||||
|
||||
//1 in 3 chance it will be a chromatic
|
||||
if (urand(0,2) == 0)
|
||||
if (urand(0, 2) == 0)
|
||||
CreatureID = CREATURE_CHROMATIC_DRAKANOID;
|
||||
else
|
||||
CreatureID = DrakType2;
|
||||
|
||||
++SpawnedAdds;
|
||||
|
||||
Spawned = me->SummonCreature(CreatureID,ADD_X2,ADD_Y2,ADD_Z2,5.000f,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,5000);
|
||||
Spawned = me->SummonCreature(CreatureID, ADD_X2, ADD_Y2, ADD_Z2, 5.000f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
|
||||
if (pTarget && Spawned)
|
||||
{
|
||||
@@ -329,7 +329,7 @@ public:
|
||||
if (SpawnedAdds >= 42)
|
||||
{
|
||||
//Teleport Victor Nefarius way out of the map
|
||||
//sMapMgr->GetMap(me->GetMapId(), me)->CreatureRelocation(me,0,0,-5000,0);
|
||||
//sMapMgr->GetMap(me->GetMapId(), me)->CreatureRelocation(me, 0, 0, -5000, 0);
|
||||
|
||||
//Interrupt any spell casting
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
@@ -341,11 +341,11 @@ public:
|
||||
DoCast(me, 8149);
|
||||
|
||||
//Teleport self to a hiding spot (this causes errors in the Trinity log but no real issues)
|
||||
DoTeleportTo(HIDE_X,HIDE_Y,HIDE_Z);
|
||||
DoTeleportTo(HIDE_X, HIDE_Y, HIDE_Z);
|
||||
me->AddUnitState(UNIT_STAT_FLEEING);
|
||||
|
||||
//Spawn nef and have him attack a random target
|
||||
Creature* Nefarian = me->SummonCreature(CREATURE_NEFARIAN,NEF_X,NEF_Y,NEF_Z,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,120000);
|
||||
Creature* Nefarian = me->SummonCreature(CREATURE_NEFARIAN, NEF_X, NEF_Y, NEF_Z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
|
||||
if (pTarget && Nefarian)
|
||||
{
|
||||
@@ -363,7 +363,7 @@ public:
|
||||
{
|
||||
if (NefCheckTime <= diff)
|
||||
{
|
||||
Unit* Nefarian = Unit::GetCreature((*me),NefarianGUID);
|
||||
Unit* Nefarian = Unit::GetCreature((*me), NefarianGUID);
|
||||
|
||||
//If nef is dead then we die to so the players get out of combat
|
||||
//and cannot repeat the event
|
||||
|
||||
@@ -67,9 +67,9 @@ public:
|
||||
|
||||
void Reset()
|
||||
{
|
||||
uiTrashTimer = urand(5000,9000);
|
||||
uiTrashTimer = urand(5000, 9000);
|
||||
uiSlamTimer = 9000;
|
||||
uiNimbleReflexesTimer = urand(15500,31600);
|
||||
uiNimbleReflexesTimer = urand(15500, 31600);
|
||||
|
||||
uiHealth = 0;
|
||||
|
||||
@@ -86,7 +86,7 @@ public:
|
||||
|
||||
bool bCheckChances()
|
||||
{
|
||||
uint32 uiChances = urand(0,99);
|
||||
uint32 uiChances = urand(0, 99);
|
||||
if (uiChances <= 15)
|
||||
return false;
|
||||
else
|
||||
@@ -103,7 +103,7 @@ public:
|
||||
{
|
||||
if (bCheckChances())
|
||||
DoCast(me, SPELL_TRASH);
|
||||
uiTrashTimer = urand(6000,15500);
|
||||
uiTrashTimer = urand(6000, 15500);
|
||||
} else uiTrashTimer -= uiDiff;
|
||||
|
||||
if (uiSlamTimer <= uiDiff)
|
||||
@@ -117,17 +117,17 @@ public:
|
||||
{
|
||||
if (bCheckChances())
|
||||
DoCast(me, SPELL_NIMBLE_REFLEXES);
|
||||
uiNimbleReflexesTimer = urand(27300,60100);
|
||||
uiNimbleReflexesTimer = urand(27300, 60100);
|
||||
} else uiNimbleReflexesTimer -= uiDiff;
|
||||
/*END ACID-AI*/
|
||||
|
||||
if ((uiHealth == 0 && !HealthAbovePct(66)) || (uiHealth == 1 && !HealthAbovePct(33)))
|
||||
{
|
||||
++uiHealth;
|
||||
DoCastAOE(SPELL_SMITE_STOMP,false);
|
||||
DoCastAOE(SPELL_SMITE_STOMP, false);
|
||||
SetCombatMovement(false);
|
||||
if (pInstance)
|
||||
if (GameObject* pGo = GameObject::GetGameObject((*me),pInstance->GetData64(DATA_SMITE_CHEST)))
|
||||
if (GameObject* pGo = GameObject::GetGameObject((*me), pInstance->GetData64(DATA_SMITE_CHEST)))
|
||||
{
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->GetMotionMaster()->MovePoint(1, pGo->GetPositionX() - 3.0f, pGo->GetPositionY(), pGo->GetPositionZ());
|
||||
|
||||
@@ -128,9 +128,9 @@ class instance_deadmines : public InstanceMapScript
|
||||
{
|
||||
if (GameObject* pIronCladDoor = instance->GetGameObject(IronCladDoorGUID))
|
||||
{
|
||||
Creature* DefiasPirate1 = pIronCladDoor->SummonCreature(657,pIronCladDoor->GetPositionX() - 2,pIronCladDoor->GetPositionY()-7,pIronCladDoor->GetPositionZ(), 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 3000);
|
||||
Creature* DefiasPirate2 = pIronCladDoor->SummonCreature(657,pIronCladDoor->GetPositionX() + 3,pIronCladDoor->GetPositionY()-6,pIronCladDoor->GetPositionZ(), 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 3000);
|
||||
Creature* DefiasCompanion = pIronCladDoor->SummonCreature(3450,pIronCladDoor->GetPositionX() + 2,pIronCladDoor->GetPositionY()-6,pIronCladDoor->GetPositionZ(), 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 3000);
|
||||
Creature* DefiasPirate1 = pIronCladDoor->SummonCreature(657, pIronCladDoor->GetPositionX() - 2, pIronCladDoor->GetPositionY()-7, pIronCladDoor->GetPositionZ(), 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 3000);
|
||||
Creature* DefiasPirate2 = pIronCladDoor->SummonCreature(657, pIronCladDoor->GetPositionX() + 3, pIronCladDoor->GetPositionY()-6, pIronCladDoor->GetPositionZ(), 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 3000);
|
||||
Creature* DefiasCompanion = pIronCladDoor->SummonCreature(3450, pIronCladDoor->GetPositionX() + 2, pIronCladDoor->GetPositionY()-6, pIronCladDoor->GetPositionZ(), 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 3000);
|
||||
|
||||
DefiasPirate1GUID = DefiasPirate1->GetGUID();
|
||||
DefiasPirate2GUID = DefiasPirate2->GetGUID();
|
||||
@@ -157,7 +157,7 @@ class instance_deadmines : public InstanceMapScript
|
||||
void MoveCreatureInside(Creature* creature)
|
||||
{
|
||||
creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
|
||||
creature->GetMotionMaster()->MovePoint(0, -102.7f,-655.9f, creature->GetPositionZ());
|
||||
creature->GetMotionMaster()->MovePoint(0, -102.7f, -655.9f, creature->GetPositionZ());
|
||||
}
|
||||
|
||||
void ShootCannon()
|
||||
@@ -239,7 +239,7 @@ class instance_deadmines : public InstanceMapScript
|
||||
WorldPacket data(4);
|
||||
data.SetOpcode(SMSG_PLAY_SOUND);
|
||||
data << uint32(sound);
|
||||
unit->SendMessageToSet(&data,false);
|
||||
unit->SendMessageToSet(&data, false);
|
||||
}
|
||||
|
||||
void DoPlaySoundCreature(Unit* unit, uint32 sound)
|
||||
@@ -247,7 +247,7 @@ class instance_deadmines : public InstanceMapScript
|
||||
WorldPacket data(4);
|
||||
data.SetOpcode(SMSG_PLAY_SOUND);
|
||||
data << uint32(sound);
|
||||
unit->SendMessageToSet(&data,false);
|
||||
unit->SendMessageToSet(&data, false);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -66,23 +66,23 @@ enum eBlastmasterEmiShortfuse
|
||||
|
||||
const Position SpawnPosition[] =
|
||||
{
|
||||
{-557.630f,-114.514f,-152.209f,0.641f},
|
||||
{-555.263f,-113.802f,-152.737f,0.311f},
|
||||
{-552.154f,-112.476f,-153.349f,0.621f},
|
||||
{-548.692f,-111.089f,-154.090f,0.621f},
|
||||
{-546.905f,-108.340f,-154.877f,0.729f},
|
||||
{-547.736f,-105.154f,-155.176f,0.372f},
|
||||
{-547.274f,-114.109f,-153.952f,0.735f},
|
||||
{-552.534f,-110.012f,-153.577f,0.747f},
|
||||
{-550.708f,-116.436f,-153.103f,0.679f},
|
||||
{-554.030f,-115.983f,-152.635f,0.695f},
|
||||
{-494.595f,-87.516f,149.116f,3.344f},
|
||||
{-493.349f,-90.845f,-148.882f,3.717f},
|
||||
{-491.995f,-87.619f,-148.197f,3.230f},
|
||||
{-490.732f,-90.739f,-148.091f,3.230f},
|
||||
{-490.554f,-89.114f,-148.055f,3.230f},
|
||||
{-495.240f,-90.808f,-149.493f,3.238f},
|
||||
{-494.195f,-89.553f,-149.131f,3.254f}
|
||||
{-557.630f, -114.514f, -152.209f, 0.641f},
|
||||
{-555.263f, -113.802f, -152.737f, 0.311f},
|
||||
{-552.154f, -112.476f, -153.349f, 0.621f},
|
||||
{-548.692f, -111.089f, -154.090f, 0.621f},
|
||||
{-546.905f, -108.340f, -154.877f, 0.729f},
|
||||
{-547.736f, -105.154f, -155.176f, 0.372f},
|
||||
{-547.274f, -114.109f, -153.952f, 0.735f},
|
||||
{-552.534f, -110.012f, -153.577f, 0.747f},
|
||||
{-550.708f, -116.436f, -153.103f, 0.679f},
|
||||
{-554.030f, -115.983f, -152.635f, 0.695f},
|
||||
{-494.595f, -87.516f, 149.116f, 3.344f},
|
||||
{-493.349f, -90.845f, -148.882f, 3.717f},
|
||||
{-491.995f, -87.619f, -148.197f, 3.230f},
|
||||
{-490.732f, -90.739f, -148.091f, 3.230f},
|
||||
{-490.554f, -89.114f, -148.055f, 3.230f},
|
||||
{-495.240f, -90.808f, -149.493f, 3.238f},
|
||||
{-494.195f, -89.553f, -149.131f, 3.254f}
|
||||
};
|
||||
|
||||
class npc_blastmaster_emi_shortfuse : public CreatureScript
|
||||
@@ -101,10 +101,10 @@ public:
|
||||
if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
|
||||
{
|
||||
if (npc_escortAI* pEscortAI = CAST_AI(npc_blastmaster_emi_shortfuse::npc_blastmaster_emi_shortfuseAI, pCreature->AI()))
|
||||
pEscortAI->Start(true, false,pPlayer->GetGUID());
|
||||
pEscortAI->Start(true, false, pPlayer->GetGUID());
|
||||
|
||||
pCreature->setFaction(pPlayer->getFaction());
|
||||
pCreature->AI()->SetData(1,0);
|
||||
pCreature->AI()->SetData(1, 0);
|
||||
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
}
|
||||
@@ -154,7 +154,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void NextStep(uint32 uiTimerStep,bool bNextStep = true,uint8 uiPhaseStep = 0)
|
||||
void NextStep(uint32 uiTimerStep, bool bNextStep = true, uint8 uiPhaseStep = 0)
|
||||
{
|
||||
uiTimer = uiTimerStep;
|
||||
if (bNextStep)
|
||||
@@ -174,14 +174,14 @@ 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! ¬¬
|
||||
trigger->CastSpell(trigger,11542,true);
|
||||
trigger->CastSpell(trigger,35470,true);
|
||||
trigger->CastSpell(trigger, 11542, true);
|
||||
trigger->CastSpell(trigger, 35470, true);
|
||||
}
|
||||
pGo->RemoveFromWorld();
|
||||
//pGo->CastSpell(me,12158); makes all die?!
|
||||
//pGo->CastSpell(me, 12158); makes all die?!
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -189,12 +189,12 @@ public:
|
||||
if (bBool)
|
||||
{
|
||||
if (pInstance)
|
||||
if (GameObject* pGo = GameObject::GetGameObject((*me),pInstance->GetData64(DATA_GO_CAVE_IN_RIGHT)))
|
||||
pInstance->HandleGameObject(0,false,pGo);
|
||||
if (GameObject* pGo = GameObject::GetGameObject((*me), pInstance->GetData64(DATA_GO_CAVE_IN_RIGHT)))
|
||||
pInstance->HandleGameObject(0, false, pGo);
|
||||
}else
|
||||
if (pInstance)
|
||||
if (GameObject* pGo = GameObject::GetGameObject((*me),pInstance->GetData64(DATA_GO_CAVE_IN_LEFT)))
|
||||
pInstance->HandleGameObject(0,false,pGo);
|
||||
if (GameObject* pGo = GameObject::GetGameObject((*me), pInstance->GetData64(DATA_GO_CAVE_IN_LEFT)))
|
||||
pInstance->HandleGameObject(0, false, pGo);
|
||||
}
|
||||
|
||||
void SetInFace(bool bBool)
|
||||
@@ -204,10 +204,10 @@ public:
|
||||
|
||||
if (bBool)
|
||||
{
|
||||
if (GameObject* pGo = GameObject::GetGameObject((*me),pInstance->GetData64(DATA_GO_CAVE_IN_RIGHT)))
|
||||
if (GameObject* pGo = GameObject::GetGameObject((*me), pInstance->GetData64(DATA_GO_CAVE_IN_RIGHT)))
|
||||
me->SetFacingToObject(pGo);
|
||||
}else
|
||||
if (GameObject* pGo = GameObject::GetGameObject((*me),pInstance->GetData64(DATA_GO_CAVE_IN_LEFT)))
|
||||
if (GameObject* pGo = GameObject::GetGameObject((*me), pInstance->GetData64(DATA_GO_CAVE_IN_LEFT)))
|
||||
me->SetFacingToObject(pGo);
|
||||
}
|
||||
|
||||
@@ -216,11 +216,11 @@ public:
|
||||
if (!pInstance)
|
||||
return;
|
||||
|
||||
if (GameObject* pGo = GameObject::GetGameObject((*me),pInstance->GetData64(DATA_GO_CAVE_IN_RIGHT)))
|
||||
pInstance->HandleGameObject(0,false,pGo);
|
||||
if (GameObject* pGo = GameObject::GetGameObject((*me), pInstance->GetData64(DATA_GO_CAVE_IN_RIGHT)))
|
||||
pInstance->HandleGameObject(0, false, pGo);
|
||||
|
||||
if (GameObject* pGo = GameObject::GetGameObject((*me),pInstance->GetData64(DATA_GO_CAVE_IN_LEFT)))
|
||||
pInstance->HandleGameObject(0,false,pGo);
|
||||
if (GameObject* pGo = GameObject::GetGameObject((*me), pInstance->GetData64(DATA_GO_CAVE_IN_LEFT)))
|
||||
pInstance->HandleGameObject(0, false, pGo);
|
||||
|
||||
if (!GoSummonList.empty())
|
||||
for (std::list<uint64>::const_iterator itr = GoSummonList.begin(); itr != GoSummonList.end(); ++itr)
|
||||
@@ -277,47 +277,47 @@ public:
|
||||
{
|
||||
case 3:
|
||||
SetEscortPaused(true);
|
||||
NextStep(2000,false,3);
|
||||
NextStep(2000, false, 3);
|
||||
break;
|
||||
case 7:
|
||||
SetEscortPaused(true);
|
||||
NextStep(2000,false,4);
|
||||
NextStep(2000, false, 4);
|
||||
break;
|
||||
case 9:
|
||||
NextStep(1000,false,8);
|
||||
NextStep(1000, false, 8);
|
||||
break;
|
||||
case 10:
|
||||
NextStep(25000,false,10);
|
||||
NextStep(25000, false, 10);
|
||||
break;
|
||||
case 11:
|
||||
SetEscortPaused(true);
|
||||
SetInFace(true);
|
||||
NextStep(1000,false,11);
|
||||
NextStep(1000, false, 11);
|
||||
break;
|
||||
case 12:
|
||||
NextStep(25000,false,18);
|
||||
NextStep(25000, false, 18);
|
||||
break;
|
||||
case 13:
|
||||
Summon(7);
|
||||
NextStep(25000,false,19);
|
||||
NextStep(25000, false, 19);
|
||||
break;
|
||||
case 14:
|
||||
SetInFace(false);
|
||||
DoScriptText(SAY_BLASTMASTER_26,me);
|
||||
DoScriptText(SAY_BLASTMASTER_26, me);
|
||||
SetEscortPaused(true);
|
||||
NextStep(5000,false,20);
|
||||
NextStep(5000, false, 20);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void SetData(uint32 uiI,uint32 uiValue)
|
||||
void SetData(uint32 uiI, uint32 uiValue)
|
||||
{
|
||||
switch(uiI)
|
||||
{
|
||||
case 1:
|
||||
SetEscortPaused(true);
|
||||
DoScriptText(SAY_BLASTMASTER_0,me);
|
||||
NextStep(1500,true);
|
||||
DoScriptText(SAY_BLASTMASTER_0, me);
|
||||
NextStep(1500, true);
|
||||
break;
|
||||
case 2:
|
||||
if (!pInstance)
|
||||
@@ -330,7 +330,7 @@ public:
|
||||
break;
|
||||
case 2:
|
||||
pInstance->SetData(TYPE_EVENT, DONE);
|
||||
NextStep(5000,false,22);
|
||||
NextStep(5000, false, 22);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@@ -354,10 +354,10 @@ public:
|
||||
me->SummonCreature(NPC_CAVERNDEEP_AMBUSHER, SpawnPosition[9], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000);
|
||||
break;
|
||||
case 2:
|
||||
if (GameObject* pGo = me->SummonGameObject(183410, -533.140f,-105.322f,-156.016f, 0, 0, 0, 0, 0, 1000))
|
||||
if (GameObject* pGo = me->SummonGameObject(183410, -533.140f, -105.322f, -156.016f, 0, 0, 0, 0, 0, 1000))
|
||||
{
|
||||
GoSummonList.push_back(pGo->GetGUID());
|
||||
pGo->SetFlag(GAMEOBJECT_FLAGS,GO_FLAG_UNK1); //We can't use it!
|
||||
pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); //We can't use it!
|
||||
}
|
||||
Summon(3);
|
||||
break;
|
||||
@@ -366,20 +366,20 @@ public:
|
||||
me->SummonCreature(NPC_CAVERNDEEP_AMBUSHER, SpawnPosition[1], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000);
|
||||
me->SummonCreature(NPC_CAVERNDEEP_AMBUSHER, SpawnPosition[2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000);
|
||||
me->SummonCreature(NPC_CAVERNDEEP_AMBUSHER, SpawnPosition[3], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000);
|
||||
DoScriptText(SAY_BLASTMASTER_19,me);
|
||||
DoScriptText(SAY_BLASTMASTER_19, me);
|
||||
break;
|
||||
case 4:
|
||||
if (GameObject* pGo = me->SummonGameObject(183410, -542.199f,-96.854f,-155.790f, 0, 0, 0, 0, 0, 1000))
|
||||
if (GameObject* pGo = me->SummonGameObject(183410, -542.199f, -96.854f, -155.790f, 0, 0, 0, 0, 0, 1000))
|
||||
{
|
||||
GoSummonList.push_back(pGo->GetGUID());
|
||||
pGo->SetFlag(GAMEOBJECT_FLAGS,GO_FLAG_UNK1);
|
||||
pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1);
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
me->SummonCreature(NPC_CAVERNDEEP_AMBUSHER, SpawnPosition[0], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000);
|
||||
me->SummonCreature(NPC_CAVERNDEEP_AMBUSHER, SpawnPosition[1], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000);
|
||||
me->SummonCreature(NPC_CAVERNDEEP_AMBUSHER, SpawnPosition[2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000);
|
||||
DoScriptText(SAY_BLASTMASTER_15,me);
|
||||
DoScriptText(SAY_BLASTMASTER_15, me);
|
||||
break;
|
||||
case 6:
|
||||
me->SummonCreature(NPC_CAVERNDEEP_AMBUSHER, SpawnPosition[10], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000);
|
||||
@@ -389,23 +389,23 @@ public:
|
||||
me->SummonCreature(NPC_CAVERNDEEP_AMBUSHER, SpawnPosition[14], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000);
|
||||
break;
|
||||
case 7:
|
||||
if (GameObject* pGo = me->SummonGameObject(183410, -507.820f,-103.333f,-151.353f, 0, 0, 0, 0, 0, 1000))
|
||||
if (GameObject* pGo = me->SummonGameObject(183410, -507.820f, -103.333f, -151.353f, 0, 0, 0, 0, 0, 1000))
|
||||
{
|
||||
GoSummonList.push_back(pGo->GetGUID());
|
||||
pGo->SetFlag(GAMEOBJECT_FLAGS,GO_FLAG_UNK1); //We can't use it!
|
||||
pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); //We can't use it!
|
||||
Summon(6);
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
if (GameObject* pGo = me->SummonGameObject(183410, -511.829f,-86.249f,-151.431f, 0, 0, 0, 0, 0, 1000))
|
||||
if (GameObject* pGo = me->SummonGameObject(183410, -511.829f, -86.249f, -151.431f, 0, 0, 0, 0, 0, 1000))
|
||||
{
|
||||
GoSummonList.push_back(pGo->GetGUID());
|
||||
pGo->SetFlag(GAMEOBJECT_FLAGS,GO_FLAG_UNK1); //We can't use it!
|
||||
pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); //We can't use it!
|
||||
}
|
||||
break;
|
||||
case 9:
|
||||
if (Creature* pGrubbis = me->SummonCreature(NPC_GRUBBIS, SpawnPosition[15], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000))
|
||||
DoScriptText(SAY_GRUBBIS,pGrubbis);
|
||||
DoScriptText(SAY_GRUBBIS, pGrubbis);
|
||||
me->SummonCreature(NPC_CHOMPER, SpawnPosition[16], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000);
|
||||
break;
|
||||
}
|
||||
@@ -420,109 +420,109 @@ public:
|
||||
switch(uiPhase)
|
||||
{
|
||||
case 1:
|
||||
DoScriptText(SAY_BLASTMASTER_1,me);
|
||||
NextStep(1500,true);
|
||||
DoScriptText(SAY_BLASTMASTER_1, me);
|
||||
NextStep(1500, true);
|
||||
break;
|
||||
case 2:
|
||||
SetEscortPaused(false);
|
||||
NextStep(0,false,0);
|
||||
NextStep(0, false, 0);
|
||||
break;
|
||||
case 3:
|
||||
DoScriptText(SAY_BLASTMASTER_2,me);
|
||||
DoScriptText(SAY_BLASTMASTER_2, me);
|
||||
SetEscortPaused(false);
|
||||
NextStep(0,false,0);
|
||||
NextStep(0, false, 0);
|
||||
break;
|
||||
case 4:
|
||||
DoScriptText(SAY_BLASTMASTER_3,me);
|
||||
NextStep(3000,true);
|
||||
DoScriptText(SAY_BLASTMASTER_3, me);
|
||||
NextStep(3000, true);
|
||||
break;
|
||||
case 5:
|
||||
DoScriptText(SAY_BLASTMASTER_4,me);
|
||||
NextStep(3000,true);
|
||||
DoScriptText(SAY_BLASTMASTER_4, me);
|
||||
NextStep(3000, true);
|
||||
break;
|
||||
case 6:
|
||||
SetInFace(true);
|
||||
DoScriptText(SAY_BLASTMASTER_5,me);
|
||||
DoScriptText(SAY_BLASTMASTER_5, me);
|
||||
Summon(1);
|
||||
if (pInstance)
|
||||
if (GameObject* pGo = GameObject::GetGameObject((*me),pInstance->GetData64(DATA_GO_CAVE_IN_RIGHT)))
|
||||
pInstance->HandleGameObject(0,true,pGo);
|
||||
NextStep(3000,true);
|
||||
if (GameObject* pGo = GameObject::GetGameObject((*me), pInstance->GetData64(DATA_GO_CAVE_IN_RIGHT)))
|
||||
pInstance->HandleGameObject(0, true, pGo);
|
||||
NextStep(3000, true);
|
||||
break;
|
||||
case 7:
|
||||
DoScriptText(SAY_BLASTMASTER_6,me);
|
||||
DoScriptText(SAY_BLASTMASTER_6, me);
|
||||
SetEscortPaused(false);
|
||||
NextStep(0,false,0);
|
||||
NextStep(0, false, 0);
|
||||
break;
|
||||
case 8:
|
||||
me->HandleEmoteCommand(EMOTE_STATE_WORK);
|
||||
NextStep(25000,true);
|
||||
NextStep(25000, true);
|
||||
break;
|
||||
case 9:
|
||||
Summon(2);
|
||||
NextStep(0,false);
|
||||
NextStep(0, false);
|
||||
break;
|
||||
case 10:
|
||||
Summon(4);
|
||||
NextStep(0,false);
|
||||
NextStep(0, false);
|
||||
break;
|
||||
case 11:
|
||||
DoScriptText(SAY_BLASTMASTER_17,me);
|
||||
NextStep(5000,true);
|
||||
DoScriptText(SAY_BLASTMASTER_17, me);
|
||||
NextStep(5000, true);
|
||||
break;
|
||||
case 12:
|
||||
DoScriptText(SAY_BLASTMASTER_18,me);
|
||||
NextStep(5000,true);
|
||||
DoScriptText(SAY_BLASTMASTER_18, me);
|
||||
NextStep(5000, true);
|
||||
break;
|
||||
case 13:
|
||||
DoScriptText(SAY_BLASTMASTER_20,me);
|
||||
DoScriptText(SAY_BLASTMASTER_20, me);
|
||||
CaveDestruction(true);
|
||||
NextStep(8000,true);
|
||||
NextStep(8000, true);
|
||||
break;
|
||||
case 14:
|
||||
DoScriptText(SAY_BLASTMASTER_21,me);
|
||||
NextStep(8500,true);
|
||||
DoScriptText(SAY_BLASTMASTER_21, me);
|
||||
NextStep(8500, true);
|
||||
break;
|
||||
case 15:
|
||||
DoScriptText(SAY_BLASTMASTER_22,me);
|
||||
NextStep(2000,true);
|
||||
DoScriptText(SAY_BLASTMASTER_22, me);
|
||||
NextStep(2000, true);
|
||||
break;
|
||||
case 16:
|
||||
DoScriptText(SAY_BLASTMASTER_23,me);
|
||||
DoScriptText(SAY_BLASTMASTER_23, me);
|
||||
SetInFace(false);
|
||||
if (pInstance)
|
||||
if (GameObject* pGo = GameObject::GetGameObject((*me),pInstance->GetData64(DATA_GO_CAVE_IN_LEFT)))
|
||||
pInstance->HandleGameObject(0,true,pGo);
|
||||
NextStep(2000,true);
|
||||
if (GameObject* pGo = GameObject::GetGameObject((*me), pInstance->GetData64(DATA_GO_CAVE_IN_LEFT)))
|
||||
pInstance->HandleGameObject(0, true, pGo);
|
||||
NextStep(2000, true);
|
||||
break;
|
||||
case 17:
|
||||
SetEscortPaused(false);
|
||||
DoScriptText(SAY_BLASTMASTER_24,me);
|
||||
DoScriptText(SAY_BLASTMASTER_24, me);
|
||||
Summon(6);
|
||||
NextStep(0,false);
|
||||
NextStep(0, false);
|
||||
break;
|
||||
case 18:
|
||||
Summon(7);
|
||||
NextStep(0,false);
|
||||
NextStep(0, false);
|
||||
break;
|
||||
case 19:
|
||||
SetInFace(false);
|
||||
Summon(8);
|
||||
DoScriptText(SAY_BLASTMASTER_25,me);
|
||||
NextStep(0,false);
|
||||
DoScriptText(SAY_BLASTMASTER_25, me);
|
||||
NextStep(0, false);
|
||||
break;
|
||||
case 20:
|
||||
DoScriptText(SAY_BLASTMASTER_27,me);
|
||||
NextStep(2000,true);
|
||||
DoScriptText(SAY_BLASTMASTER_27, me);
|
||||
NextStep(2000, true);
|
||||
break;
|
||||
case 21:
|
||||
Summon(9);
|
||||
NextStep(0,false);
|
||||
NextStep(0, false);
|
||||
break;
|
||||
case 22:
|
||||
CaveDestruction(false);
|
||||
DoScriptText(SAY_BLASTMASTER_20,me);
|
||||
NextStep(0,false);
|
||||
DoScriptText(SAY_BLASTMASTER_20, me);
|
||||
NextStep(0, false);
|
||||
break;
|
||||
}
|
||||
} else uiTimer -= uiDiff;
|
||||
@@ -566,7 +566,7 @@ public:
|
||||
return;
|
||||
|
||||
if (Unit* pSummon = CAST_SUM(me)->GetSummoner())
|
||||
CAST_CRE(pSummon)->AI()->SetData(2,1);
|
||||
CAST_CRE(pSummon)->AI()->SetData(2, 1);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 /*diff*/)
|
||||
@@ -583,7 +583,7 @@ public:
|
||||
return;
|
||||
|
||||
if (Unit* pSummon = CAST_SUM(me)->GetSummoner())
|
||||
CAST_CRE(pSummon)->AI()->SetData(2,2);
|
||||
CAST_CRE(pSummon)->AI()->SetData(2, 2);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -90,12 +90,12 @@ public:
|
||||
case GO_CAVE_IN_LEFT:
|
||||
uiCaveInLeftGUID = go->GetGUID();
|
||||
if (m_auiEncounter[0] == DONE || m_auiEncounter[0] == NOT_STARTED)
|
||||
HandleGameObject(0,false,go);
|
||||
HandleGameObject(0, false, go);
|
||||
break;
|
||||
case GO_CAVE_IN_RIGHT:
|
||||
uiCaveInRightGUID = go->GetGUID();
|
||||
if (m_auiEncounter[0] == DONE || m_auiEncounter[0] == NOT_STARTED)
|
||||
HandleGameObject(0,false,go);
|
||||
HandleGameObject(0, false, go);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit * /*victim*/)
|
||||
{
|
||||
DoScriptText(RAND(SAY_KILL1,SAY_KILL2), me);
|
||||
DoScriptText(RAND(SAY_KILL1, SAY_KILL2), me);
|
||||
}
|
||||
|
||||
void JustDied(Unit * /*victim*/)
|
||||
@@ -159,9 +159,9 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
if (urand(0,1) == 0)
|
||||
if (urand(0, 1) == 0)
|
||||
{
|
||||
DoScriptText(RAND(SAY_SUMMON1,SAY_SUMMON2), me);
|
||||
DoScriptText(RAND(SAY_SUMMON1, SAY_SUMMON2), me);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,8 +74,8 @@ public:
|
||||
|
||||
void KilledUnit(Unit* /*Victim*/)
|
||||
{
|
||||
if (urand(0,1) == 0)
|
||||
DoScriptText(RAND(SAY_SLAY1,SAY_SLAY2,SAY_SLAY3), me);
|
||||
if (urand(0, 1) == 0)
|
||||
DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2, SAY_SLAY3), me);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*Killer*/)
|
||||
@@ -108,9 +108,9 @@ public:
|
||||
if (Repentance_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_REPENTANCE);
|
||||
DoScriptText(RAND(SAY_REPENTANCE1,SAY_REPENTANCE2), me);
|
||||
DoScriptText(RAND(SAY_REPENTANCE1, SAY_REPENTANCE2), me);
|
||||
|
||||
Repentance_Timer = urand(25000,35000); //A little randomness on that spell
|
||||
Repentance_Timer = urand(25000, 35000); //A little randomness on that spell
|
||||
} else Repentance_Timer -= diff;
|
||||
|
||||
if (Holyfire_Timer <= diff)
|
||||
@@ -118,7 +118,7 @@ public:
|
||||
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!
|
||||
Holyfire_Timer = urand(8000, 23000); //Anywhere from 8 to 23 seconds, good luck having several of those in a row!
|
||||
} else Holyfire_Timer -= diff;
|
||||
|
||||
if (Holywrath_Timer <= diff)
|
||||
@@ -126,7 +126,7 @@ public:
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(pTarget, SPELL_HOLYWRATH);
|
||||
|
||||
Holywrath_Timer = urand(20000,25000); //20-30 secs sounds nice
|
||||
Holywrath_Timer = urand(20000, 25000); //20-30 secs sounds nice
|
||||
} else Holywrath_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
|
||||
@@ -62,9 +62,9 @@ public:
|
||||
{
|
||||
Phase = 1;
|
||||
|
||||
CleaveTimer = urand(10000,15000);
|
||||
CleaveTimer = urand(10000, 15000);
|
||||
CurseTimer = 30000;
|
||||
RandomYellTimer = urand(30000,60000); //Occasionally yell
|
||||
RandomYellTimer = urand(30000, 60000); //Occasionally yell
|
||||
ChargeTimer = 20000;
|
||||
ResetTimer = 0;
|
||||
}
|
||||
@@ -86,7 +86,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit * /*victim*/)
|
||||
{
|
||||
DoScriptText(RAND(SAY_KILL1,SAY_KILL2), me);
|
||||
DoScriptText(RAND(SAY_KILL1, SAY_KILL2), me);
|
||||
}
|
||||
|
||||
void JustDied(Unit * /*victim*/)
|
||||
@@ -159,7 +159,7 @@ public:
|
||||
Attumen = pAttumen->GetGUID();
|
||||
pAttumen->AI()->AttackStart(me->getVictim());
|
||||
SetMidnight(pAttumen, me->GetGUID());
|
||||
DoScriptText(RAND(SAY_APPEAR1,SAY_APPEAR2,SAY_APPEAR3), pAttumen);
|
||||
DoScriptText(RAND(SAY_APPEAR1, SAY_APPEAR2, SAY_APPEAR3), pAttumen);
|
||||
}
|
||||
}
|
||||
else if (Phase == 2 && HealthBelowPct(25))
|
||||
@@ -185,7 +185,7 @@ public:
|
||||
pAttumen->GetMotionMaster()->MoveChase(pAttumen->getVictim());
|
||||
pAttumen->SetUInt64Value(UNIT_FIELD_TARGET, pAttumen->getVictim()->GetGUID());
|
||||
}
|
||||
pAttumen->SetFloatValue(OBJECT_FIELD_SCALE_X,1);
|
||||
pAttumen->SetFloatValue(OBJECT_FIELD_SCALE_X, 1);
|
||||
}
|
||||
} else Mount_Timer -= diff;
|
||||
}
|
||||
@@ -206,7 +206,7 @@ public:
|
||||
float newX = me->GetPositionX() + cos(angle)*(distance/2) ;
|
||||
float newY = me->GetPositionY() + sin(angle)*(distance/2) ;
|
||||
float newZ = 50;
|
||||
//me->Relocate(newX,newY,newZ,angle);
|
||||
//me->Relocate(newX, newY, newZ, angle);
|
||||
//me->SendMonsterMove(newX, newY, newZ, 0, true, 1000);
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->GetMotionMaster()->MovePoint(0, newX, newY, newZ);
|
||||
@@ -215,7 +215,7 @@ public:
|
||||
newY = me->GetPositionY() + sin(angle)*(distance/2) ;
|
||||
pAttumen->GetMotionMaster()->Clear();
|
||||
pAttumen->GetMotionMaster()->MovePoint(0, newX, newY, newZ);
|
||||
//pAttumen->Relocate(newX,newY,newZ,-angle);
|
||||
//pAttumen->Relocate(newX, newY, newZ, -angle);
|
||||
//pAttumen->SendMonsterMove(newX, newY, newZ, 0, true, 1000);
|
||||
Mount_Timer = 1000;
|
||||
}
|
||||
@@ -257,7 +257,7 @@ void boss_attumen::boss_attumenAI::UpdateAI(const uint32 diff)
|
||||
if (CleaveTimer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SHADOWCLEAVE);
|
||||
CleaveTimer = urand(10000,15000);
|
||||
CleaveTimer = urand(10000, 15000);
|
||||
} else CleaveTimer -= diff;
|
||||
|
||||
if (CurseTimer <= diff)
|
||||
@@ -268,8 +268,8 @@ void boss_attumen::boss_attumenAI::UpdateAI(const uint32 diff)
|
||||
|
||||
if (RandomYellTimer <= diff)
|
||||
{
|
||||
DoScriptText(RAND(SAY_RANDOM1,SAY_RANDOM2), me);
|
||||
RandomYellTimer = urand(30000,60000);
|
||||
DoScriptText(RAND(SAY_RANDOM1, SAY_RANDOM2), me);
|
||||
RandomYellTimer = urand(30000, 60000);
|
||||
} else RandomYellTimer -= diff;
|
||||
|
||||
if (me->GetUInt32Value(UNIT_FIELD_DISPLAYID) == MOUNTED_DISPLAYID)
|
||||
|
||||
@@ -133,7 +133,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit* /*victim*/)
|
||||
{
|
||||
DoScriptText(RAND(SAY_KILL_1,SAY_KILL_2,SAY_KILL_3), me);
|
||||
DoScriptText(RAND(SAY_KILL_1, SAY_KILL_2, SAY_KILL_3), me);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*victim*/)
|
||||
@@ -207,7 +207,7 @@ public:
|
||||
Creature* Temp = NULL;
|
||||
if (AddGUID[i])
|
||||
{
|
||||
Temp = Creature::GetCreature((*me),AddGUID[i]);
|
||||
Temp = Creature::GetCreature((*me), AddGUID[i]);
|
||||
if (Temp && Temp->isAlive())
|
||||
Temp->DisappearAndDie();
|
||||
}
|
||||
@@ -221,7 +221,7 @@ public:
|
||||
Creature* Temp = NULL;
|
||||
if (AddGUID[i])
|
||||
{
|
||||
Temp = Creature::GetCreature((*me),AddGUID[i]);
|
||||
Temp = Creature::GetCreature((*me), AddGUID[i]);
|
||||
if (Temp && Temp->isAlive())
|
||||
{
|
||||
Temp->AI()->AttackStart(me->getVictim());
|
||||
@@ -256,7 +256,7 @@ public:
|
||||
Creature* Temp = NULL;
|
||||
if (AddGUID[i])
|
||||
{
|
||||
Temp = Unit::GetCreature((*me),AddGUID[i]);
|
||||
Temp = Unit::GetCreature((*me), AddGUID[i]);
|
||||
if (Temp && Temp->isAlive())
|
||||
if (!Temp->getVictim())
|
||||
Temp->AI()->AttackStart(me->getVictim());
|
||||
@@ -300,10 +300,10 @@ public:
|
||||
{
|
||||
if (Wait_Timer <= diff)
|
||||
{
|
||||
DoScriptText(RAND(SAY_SPECIAL_1,SAY_SPECIAL_2), me);
|
||||
DoScriptText(RAND(SAY_SPECIAL_1, SAY_SPECIAL_2), me);
|
||||
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
pTarget->CastSpell(pTarget, SPELL_GARROTE,true);
|
||||
pTarget->CastSpell(pTarget, SPELL_GARROTE, true);
|
||||
|
||||
InVanish = false;
|
||||
} else Wait_Timer -= diff;
|
||||
|
||||
@@ -52,11 +52,11 @@ enum Netherspite_Portal{
|
||||
};
|
||||
|
||||
const uint32 PortalID[3] = {17369, 17367, 17368};
|
||||
const uint32 PortalVisual[3] = {30487,30490,30491};
|
||||
const uint32 PortalBeam[3] = {30465,30464,30463};
|
||||
const uint32 PlayerBuff[3] = {30421,30422,30423};
|
||||
const uint32 NetherBuff[3] = {30466,30467,30468};
|
||||
const uint32 PlayerDebuff[3] = {38637,38638,38639};
|
||||
const uint32 PortalVisual[3] = {30487, 30490, 30491};
|
||||
const uint32 PortalBeam[3] = {30465, 30464, 30463};
|
||||
const uint32 PlayerBuff[3] = {30421, 30422, 30423};
|
||||
const uint32 NetherBuff[3] = {30466, 30467, 30468};
|
||||
const uint32 PlayerDebuff[3] = {38637, 38638, 38639};
|
||||
|
||||
class boss_netherspite : public CreatureScript
|
||||
{
|
||||
@@ -110,10 +110,10 @@ public:
|
||||
yh = pTarget->GetPositionY();
|
||||
|
||||
// check if target is between (not checking distance from the beam yet)
|
||||
if (dist(xn,yn,xh,yh) >= dist(xn,yn,xp,yp) || dist(xp,yp,xh,yh) >= dist(xn,yn,xp,yp))
|
||||
if (dist(xn, yn, xh, yh) >= dist(xn, yn, xp, yp) || dist(xp, yp, xh, yh) >= dist(xn, yn, xp, yp))
|
||||
return false;
|
||||
// check distance from the beam
|
||||
return (abs((xn-xp)*yh+(yp-yn)*xh-xn*yp+xp*yn)/dist(xn,yn,xp,yp) < 1.5f);
|
||||
return (abs((xn-xp)*yh+(yp-yn)*xh-xn*yp+xp*yn)/dist(xn, yn, xp, yp) < 1.5f);
|
||||
}
|
||||
|
||||
float dist(float xa, float ya, float xb, float yb) // auxiliary method for distance
|
||||
@@ -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);
|
||||
@@ -181,9 +181,9 @@ public:
|
||||
Player* p = i->getSource();
|
||||
if (p && p->isAlive() // alive
|
||||
&& (!pTarget || pTarget->GetDistance2d(portal)>p->GetDistance2d(portal)) // closer than current best
|
||||
&& !p->HasAura(PlayerDebuff[j],0) // not exhausted
|
||||
&& !p->HasAura(PlayerBuff[(j+1)%3],0) // not on another beam
|
||||
&& !p->HasAura(PlayerBuff[(j+2)%3],0)
|
||||
&& !p->HasAura(PlayerDebuff[j], 0) // not exhausted
|
||||
&& !p->HasAura(PlayerBuff[(j+1)%3], 0) // not on another beam
|
||||
&& !p->HasAura(PlayerBuff[(j+2)%3], 0)
|
||||
&& IsBetween(me, p, portal)) // on the beam
|
||||
pTarget = p;
|
||||
}
|
||||
@@ -206,7 +206,7 @@ public:
|
||||
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();
|
||||
@@ -227,7 +227,7 @@ public:
|
||||
PortalPhase = true;
|
||||
PortalTimer = 10000;
|
||||
EmpowermentTimer = 10000;
|
||||
DoScriptText(EMOTE_PHASE_PORTAL,me);
|
||||
DoScriptText(EMOTE_PHASE_PORTAL, me);
|
||||
}
|
||||
|
||||
void SwitchToBanishPhase()
|
||||
@@ -239,7 +239,7 @@ public:
|
||||
DestroyPortals();
|
||||
PhaseTimer = 30000;
|
||||
PortalPhase = false;
|
||||
DoScriptText(EMOTE_PHASE_BANISH,me);
|
||||
DoScriptText(EMOTE_PHASE_BANISH, me);
|
||||
|
||||
for (int i=0; i<3; ++i)
|
||||
me->RemoveAurasDueToSpell(NetherBuff[i]);
|
||||
@@ -271,7 +271,7 @@ public:
|
||||
// Void Zone
|
||||
if (VoidZoneTimer <= diff)
|
||||
{
|
||||
DoCast(SelectTarget(SELECT_TARGET_RANDOM,1,45,true),SPELL_VOIDZONE,true);
|
||||
DoCast(SelectTarget(SELECT_TARGET_RANDOM, 1, 45, true), SPELL_VOIDZONE, true);
|
||||
VoidZoneTimer = 15000;
|
||||
} else VoidZoneTimer -= diff;
|
||||
|
||||
@@ -314,9 +314,9 @@ 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);
|
||||
NetherbreathTimer = urand(5000, 7000);
|
||||
} else NetherbreathTimer -= diff;
|
||||
|
||||
if (PhaseTimer <= diff)
|
||||
|
||||
@@ -48,14 +48,14 @@ EndScriptData */
|
||||
|
||||
float IntroWay[8][3] =
|
||||
{
|
||||
{-11053.37f,-1794.48f,149.00f},
|
||||
{-11141.07f,-1841.40f,125.00f},
|
||||
{-11187.28f,-1890.23f,125.00f},
|
||||
{-11189.20f,-1931.25f,125.00f},
|
||||
{-11153.76f,-1948.93f,125.00f},
|
||||
{-11128.73f,-1929.75f,125.00f},
|
||||
{-11140.00f,-1915.00f,122.00f},
|
||||
{-11163.00f,-1903.00f,91.473f}
|
||||
{-11053.37f, -1794.48f, 149.00f},
|
||||
{-11141.07f, -1841.40f, 125.00f},
|
||||
{-11187.28f, -1890.23f, 125.00f},
|
||||
{-11189.20f, -1931.25f, 125.00f},
|
||||
{-11153.76f, -1948.93f, 125.00f},
|
||||
{-11128.73f, -1929.75f, 125.00f},
|
||||
{-11140.00f, -1915.00f, 122.00f},
|
||||
{-11163.00f, -1903.00f, 91.473f}
|
||||
};
|
||||
|
||||
class boss_nightbane : public CreatureScript
|
||||
@@ -140,7 +140,7 @@ public:
|
||||
|
||||
if (!Intro)
|
||||
{
|
||||
me->SetHomePosition(IntroWay[7][0],IntroWay[7][1],IntroWay[7][2],0);
|
||||
me->SetHomePosition(IntroWay[7][0], IntroWay[7][1], IntroWay[7][2], 0);
|
||||
me->GetMotionMaster()->MoveTargetedHome();
|
||||
}
|
||||
}
|
||||
@@ -193,7 +193,7 @@ public:
|
||||
if (id >= 8)
|
||||
{
|
||||
Intro = false;
|
||||
me->SetHomePosition(IntroWay[7][0],IntroWay[7][1],IntroWay[7][2],0);
|
||||
me->SetHomePosition(IntroWay[7][0], IntroWay[7][1], IntroWay[7][2], 0);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -242,11 +242,11 @@ public:
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
|
||||
me->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
|
||||
(*me).GetMotionMaster()->Clear(false);
|
||||
(*me).GetMotionMaster()->MovePoint(0,IntroWay[2][0],IntroWay[2][1],IntroWay[2][2]);
|
||||
(*me).GetMotionMaster()->MovePoint(0, IntroWay[2][0], IntroWay[2][1], IntroWay[2][2]);
|
||||
|
||||
Flying = true;
|
||||
|
||||
FlyTimer = urand(45000,60000); //timer wrong between 45 and 60 seconds
|
||||
FlyTimer = urand(45000, 60000); //timer wrong between 45 and 60 seconds
|
||||
++FlyCount;
|
||||
|
||||
RainofBonesTimer = 5000; //timer wrong (maybe)
|
||||
@@ -265,11 +265,11 @@ public:
|
||||
{
|
||||
me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_LAND);
|
||||
me->GetMotionMaster()->MovePoint(8,IntroWay[7][0],IntroWay[7][1],IntroWay[7][2]);
|
||||
me->GetMotionMaster()->MovePoint(8, IntroWay[7][0], IntroWay[7][1], IntroWay[7][2]);
|
||||
}
|
||||
else
|
||||
{
|
||||
me->GetMotionMaster()->MovePoint(MovePhase,IntroWay[MovePhase][0],IntroWay[MovePhase][1],IntroWay[MovePhase][2]);
|
||||
me->GetMotionMaster()->MovePoint(MovePhase, IntroWay[MovePhase][0], IntroWay[MovePhase][1], IntroWay[MovePhase][2]);
|
||||
++MovePhase;
|
||||
}
|
||||
}
|
||||
@@ -279,11 +279,11 @@ public:
|
||||
{
|
||||
me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_LAND);
|
||||
me->GetMotionMaster()->MovePoint(8,IntroWay[7][0],IntroWay[7][1],IntroWay[7][2]);
|
||||
me->GetMotionMaster()->MovePoint(8, IntroWay[7][0], IntroWay[7][1], IntroWay[7][2]);
|
||||
}
|
||||
else
|
||||
{
|
||||
me->GetMotionMaster()->MovePoint(MovePhase,IntroWay[MovePhase][0],IntroWay[MovePhase][1],IntroWay[MovePhase][2]);
|
||||
me->GetMotionMaster()->MovePoint(MovePhase, IntroWay[MovePhase][0], IntroWay[MovePhase][1], IntroWay[MovePhase][2]);
|
||||
++MovePhase;
|
||||
}
|
||||
}
|
||||
@@ -310,7 +310,7 @@ public:
|
||||
if (BellowingRoarTimer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_BELLOWING_ROAR);
|
||||
BellowingRoarTimer = urand(30000,40000);
|
||||
BellowingRoarTimer = urand(30000, 40000);
|
||||
} else BellowingRoarTimer -= diff;
|
||||
|
||||
if (SmolderingBreathTimer <= diff)
|
||||
@@ -402,10 +402,10 @@ public:
|
||||
|
||||
if (FlyTimer <= diff) //landing
|
||||
{
|
||||
me->MonsterYell(RAND(*YELL_LAND_PHASE_1,*YELL_LAND_PHASE_2), LANG_UNIVERSAL, 0);
|
||||
me->MonsterYell(RAND(*YELL_LAND_PHASE_1, *YELL_LAND_PHASE_2), LANG_UNIVERSAL, 0);
|
||||
|
||||
me->GetMotionMaster()->Clear(false);
|
||||
me->GetMotionMaster()->MovePoint(3,IntroWay[3][0],IntroWay[3][1],IntroWay[3][2]);
|
||||
me->GetMotionMaster()->MovePoint(3, IntroWay[3][0], IntroWay[3][1], IntroWay[3][2]);
|
||||
|
||||
Flying = true;
|
||||
} else FlyTimer -= diff;
|
||||
|
||||
@@ -42,7 +42,7 @@ EndScriptData */
|
||||
// 18 Coordinates for Infernal spawns
|
||||
struct InfernalPoint
|
||||
{
|
||||
float x,y;
|
||||
float x, y;
|
||||
};
|
||||
|
||||
#define INFERNAL_Z 275.5f
|
||||
@@ -230,8 +230,8 @@ public:
|
||||
Cleave_Timer = 8000;
|
||||
InfernalTimer = 45000;
|
||||
InfernalCleanupTimer = 47000;
|
||||
AxesTargetSwitchTimer = urand(7500,20000);
|
||||
SunderArmorTimer = urand(5000,10000);
|
||||
AxesTargetSwitchTimer = urand(7500, 20000);
|
||||
SunderArmorTimer = urand(5000, 10000);
|
||||
phase = 1;
|
||||
|
||||
if (pInstance)
|
||||
@@ -240,7 +240,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit * /*victim*/)
|
||||
{
|
||||
DoScriptText(RAND(SAY_SLAY1,SAY_SLAY2,SAY_SLAY3), me);
|
||||
DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2, SAY_SLAY3), me);
|
||||
}
|
||||
|
||||
void JustDied(Unit * /*victim*/)
|
||||
@@ -379,7 +379,7 @@ public:
|
||||
DoCast(Infernal, SPELL_INFERNAL_RELAY);
|
||||
}
|
||||
|
||||
DoScriptText(RAND(SAY_SUMMON1,SAY_SUMMON2), me);
|
||||
DoScriptText(RAND(SAY_SUMMON1, SAY_SUMMON2), me);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -477,14 +477,14 @@ public:
|
||||
if (SunderArmorTimer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SUNDER_ARMOR);
|
||||
SunderArmorTimer = urand(10000,18000);
|
||||
SunderArmorTimer = urand(10000, 18000);
|
||||
|
||||
} else SunderArmorTimer -= diff;
|
||||
|
||||
if (Cleave_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_CLEAVE);
|
||||
Cleave_Timer = urand(6000,12000);
|
||||
Cleave_Timer = urand(6000, 12000);
|
||||
|
||||
} else Cleave_Timer -= diff;
|
||||
}
|
||||
@@ -492,7 +492,7 @@ public:
|
||||
{
|
||||
if (AxesTargetSwitchTimer <= diff)
|
||||
{
|
||||
AxesTargetSwitchTimer = urand(7500,20000);
|
||||
AxesTargetSwitchTimer = urand(7500, 20000);
|
||||
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
{
|
||||
@@ -515,7 +515,7 @@ public:
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(pTarget, SPELL_AMPLIFY_DAMAGE);
|
||||
AmplifyDamageTimer = urand(20000,30000);
|
||||
AmplifyDamageTimer = urand(20000, 30000);
|
||||
} else AmplifyDamageTimer -= diff;
|
||||
}
|
||||
|
||||
|
||||
@@ -159,7 +159,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit * /*victim*/)
|
||||
{
|
||||
DoScriptText(RAND(SAY_KILL1,SAY_KILL2), me);
|
||||
DoScriptText(RAND(SAY_KILL1, SAY_KILL2), me);
|
||||
}
|
||||
|
||||
void JustDied(Unit * /*victim*/)
|
||||
@@ -175,7 +175,7 @@ public:
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
DoScriptText(RAND(SAY_AGGRO1,SAY_AGGRO2,SAY_AGGRO3), me);
|
||||
DoScriptText(RAND(SAY_AGGRO1, SAY_AGGRO2, SAY_AGGRO3), me);
|
||||
|
||||
if (pInstance)
|
||||
{
|
||||
@@ -345,7 +345,7 @@ public:
|
||||
|
||||
if (SecondarySpellTimer <= diff)
|
||||
{
|
||||
switch (urand(0,1))
|
||||
switch (urand(0, 1))
|
||||
{
|
||||
case 0:
|
||||
DoCast(me, SPELL_AOE_CS);
|
||||
@@ -355,7 +355,7 @@ public:
|
||||
DoCast(pTarget, SPELL_CHAINSOFICE);
|
||||
break;
|
||||
}
|
||||
SecondarySpellTimer = urand(5000,20000);
|
||||
SecondarySpellTimer = urand(5000, 20000);
|
||||
} else SecondarySpellTimer -= diff;
|
||||
|
||||
if (SuperCastTimer <= diff)
|
||||
@@ -378,12 +378,12 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
LastSuperSpell = Available[urand(0,1)];
|
||||
LastSuperSpell = Available[urand(0, 1)];
|
||||
|
||||
switch (LastSuperSpell)
|
||||
{
|
||||
case SUPER_AE:
|
||||
DoScriptText(RAND(SAY_EXPLOSION1,SAY_EXPLOSION2), me);
|
||||
DoScriptText(RAND(SAY_EXPLOSION1, SAY_EXPLOSION2), me);
|
||||
|
||||
DoCast(me, SPELL_BLINK_CENTER, true);
|
||||
DoCast(me, SPELL_PLAYERPULL, true);
|
||||
@@ -392,7 +392,7 @@ public:
|
||||
break;
|
||||
|
||||
case SUPER_FLAME:
|
||||
DoScriptText(RAND(SAY_FLAMEWREATH1,SAY_FLAMEWREATH2), me);
|
||||
DoScriptText(RAND(SAY_FLAMEWREATH1, SAY_FLAMEWREATH2), me);
|
||||
|
||||
FlameWreathTimer = 20000;
|
||||
FlameWreathCheckTime = 500;
|
||||
@@ -405,7 +405,7 @@ public:
|
||||
break;
|
||||
|
||||
case SUPER_BLIZZARD:
|
||||
DoScriptText(RAND(SAY_BLIZZARD1,SAY_BLIZZARD2), me);
|
||||
DoScriptText(RAND(SAY_BLIZZARD1, SAY_BLIZZARD2), me);
|
||||
|
||||
if (Creature* pSpawn = me->SummonCreature(CREATURE_ARAN_BLIZZARD, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 25000))
|
||||
{
|
||||
@@ -415,7 +415,7 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
SuperCastTimer = urand(35000,40000);
|
||||
SuperCastTimer = urand(35000, 40000);
|
||||
} else SuperCastTimer -= diff;
|
||||
|
||||
if (!ElementalsSpawned && HealthBelowPct(40))
|
||||
@@ -542,7 +542,7 @@ public:
|
||||
if (CastTimer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_WATERBOLT);
|
||||
CastTimer = urand(2000,5000);
|
||||
CastTimer = urand(2000, 5000);
|
||||
} else CastTimer -= diff;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -119,7 +119,7 @@ public:
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
DoCast(me->getVictim(), SPELL_AMPLIFY_FLAMES);
|
||||
|
||||
AmplifyTimer = urand(10000,20000);
|
||||
AmplifyTimer = urand(10000, 20000);
|
||||
} else AmplifyTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
@@ -157,7 +157,7 @@ public:
|
||||
{
|
||||
if (SacrificeGUID)
|
||||
{
|
||||
Unit* Sacrifice = Unit::GetUnit((*me),SacrificeGUID);
|
||||
Unit* Sacrifice = Unit::GetUnit((*me), SacrificeGUID);
|
||||
if (Sacrifice)
|
||||
Sacrifice->RemoveAurasDueToSpell(SPELL_SACRIFICE);
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
@@ -333,7 +333,7 @@ public:
|
||||
|
||||
if (pSummoned->GetUInt32Value(UNIT_CREATED_BY_SPELL) == SPELL_FIENDISH_PORTAL_1)
|
||||
{
|
||||
DoScriptText(RAND(SAY_SUMMON1,SAY_SUMMON2), me);
|
||||
DoScriptText(RAND(SAY_SUMMON1, SAY_SUMMON2), me);
|
||||
SummonedPortals = true;
|
||||
}
|
||||
}
|
||||
@@ -341,7 +341,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit * /*victim*/)
|
||||
{
|
||||
DoScriptText(RAND(SAY_SLAY1,SAY_SLAY2), me);
|
||||
DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me);
|
||||
}
|
||||
|
||||
void JustDied(Unit * /*killer*/)
|
||||
@@ -380,7 +380,7 @@ public:
|
||||
{
|
||||
CAST_AI(mob_demon_chain::mob_demon_chainAI, Chains->AI())->SacrificeGUID = pTarget->GetGUID();
|
||||
Chains->CastSpell(Chains, SPELL_DEMON_CHAINS, true);
|
||||
DoScriptText(RAND(SAY_SACRIFICE1,SAY_SACRIFICE2), me);
|
||||
DoScriptText(RAND(SAY_SACRIFICE1, SAY_SACRIFICE2), me);
|
||||
SacrificeTimer = 30000;
|
||||
}
|
||||
}
|
||||
@@ -402,7 +402,7 @@ public:
|
||||
|
||||
if (PortalGUID[0] && PortalGUID[1])
|
||||
{
|
||||
if (Creature* pPortal = Unit::GetCreature(*me, PortalGUID[urand(0,1)]))
|
||||
if (Creature* pPortal = Unit::GetCreature(*me, PortalGUID[urand(0, 1)]))
|
||||
pPortal->CastSpell(me->getVictim(), SPELL_SUMMON_FIENDISIMP, false);
|
||||
SummonTimer = 5000;
|
||||
}
|
||||
|
||||
@@ -345,7 +345,7 @@ public:
|
||||
if ((Spell->SchoolMask == SPELL_SCHOOL_MASK_FIRE) && (!(rand()%10)))
|
||||
{
|
||||
/*
|
||||
if (not direct damage(aoe,dot))
|
||||
if (not direct damage(aoe, dot))
|
||||
return;
|
||||
*/
|
||||
|
||||
@@ -597,19 +597,19 @@ public:
|
||||
if (MangleTimer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_MANGLE);
|
||||
MangleTimer = urand(5000,8000);
|
||||
MangleTimer = urand(5000, 8000);
|
||||
} else MangleTimer -= diff;
|
||||
|
||||
if (ShredTimer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SHRED);
|
||||
ShredTimer = urand(10000,15000);
|
||||
ShredTimer = urand(10000, 15000);
|
||||
} else ShredTimer -= diff;
|
||||
|
||||
if (ScreamTimer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_FRIGHTENED_SCREAM);
|
||||
ScreamTimer = urand(20000,30000);
|
||||
ScreamTimer = urand(20000, 30000);
|
||||
} else ScreamTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
@@ -653,7 +653,7 @@ public:
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoScriptText(RAND(SAY_CRONE_AGGRO,SAY_CRONE_AGGRO2), me);
|
||||
DoScriptText(RAND(SAY_CRONE_AGGRO, SAY_CRONE_AGGRO2), me);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
|
||||
}
|
||||
@@ -683,7 +683,7 @@ public:
|
||||
|
||||
if (CycloneTimer <= diff)
|
||||
{
|
||||
if (Creature* Cyclone = DoSpawnCreature(CREATURE_CYCLONE, float(urand(0,9)), float(urand(0,9)), 0, 0, TEMPSUMMON_TIMED_DESPAWN, 15000))
|
||||
if (Creature* Cyclone = DoSpawnCreature(CREATURE_CYCLONE, float(urand(0, 9)), float(urand(0, 9)), 0, 0, TEMPSUMMON_TIMED_DESPAWN, 15000))
|
||||
Cyclone->CastSpell(Cyclone, SPELL_CYCLONE_VISUAL, true);
|
||||
CycloneTimer = 30000;
|
||||
} else CycloneTimer -= diff;
|
||||
@@ -737,7 +737,7 @@ public:
|
||||
Position pos;
|
||||
me->GetRandomNearPosition(pos, 10);
|
||||
me->GetMotionMaster()->MovePoint(0, pos);
|
||||
MoveTimer = urand(5000,8000);
|
||||
MoveTimer = urand(5000, 8000);
|
||||
} else MoveTimer -= diff;
|
||||
}
|
||||
};
|
||||
@@ -905,13 +905,13 @@ public:
|
||||
if (FearTimer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_TERRIFYING_HOWL);
|
||||
FearTimer = urand(25000,35000);
|
||||
FearTimer = urand(25000, 35000);
|
||||
} else FearTimer -= diff;
|
||||
|
||||
if (SwipeTimer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_WIDE_SWIPE);
|
||||
SwipeTimer = urand(25000,30000);
|
||||
SwipeTimer = urand(25000, 30000);
|
||||
} else SwipeTimer -= diff;
|
||||
|
||||
}
|
||||
@@ -1293,27 +1293,27 @@ public:
|
||||
if (pTarget && !me->HasInArc(M_PI, pTarget))
|
||||
{
|
||||
DoCast(pTarget, SPELL_BACKWARD_LUNGE);
|
||||
BackwardLungeTimer = urand(15000,30000);
|
||||
BackwardLungeTimer = urand(15000, 30000);
|
||||
}
|
||||
} else BackwardLungeTimer -= diff;
|
||||
|
||||
if (DaringTimer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_DARING);
|
||||
DaringTimer = urand(20000,40000);
|
||||
DaringTimer = urand(20000, 40000);
|
||||
} else DaringTimer -= diff;
|
||||
|
||||
if (DeadlySwatheTimer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(pTarget, SPELL_DEADLY_SWATHE);
|
||||
DeadlySwatheTimer = urand(15000,25000);
|
||||
DeadlySwatheTimer = urand(15000, 25000);
|
||||
} else DeadlySwatheTimer -= diff;
|
||||
|
||||
if (PoisonThrustTimer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_POISON_THRUST);
|
||||
PoisonThrustTimer = urand(10000,20000);
|
||||
PoisonThrustTimer = urand(10000, 20000);
|
||||
} else PoisonThrustTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
@@ -1412,31 +1412,31 @@ void boss_julianne::boss_julianneAI::UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(pTarget, SPELL_BLINDING_PASSION);
|
||||
BlindingPassionTimer = urand(30000,45000);
|
||||
BlindingPassionTimer = urand(30000, 45000);
|
||||
} else BlindingPassionTimer -= diff;
|
||||
|
||||
if (DevotionTimer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_DEVOTION);
|
||||
DevotionTimer = urand(15000,45000);
|
||||
DevotionTimer = urand(15000, 45000);
|
||||
} else DevotionTimer -= diff;
|
||||
|
||||
if (PowerfulAttractionTimer <= diff)
|
||||
{
|
||||
DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0), SPELL_POWERFUL_ATTRACTION);
|
||||
PowerfulAttractionTimer = urand(5000,30000);
|
||||
PowerfulAttractionTimer = urand(5000, 30000);
|
||||
} else PowerfulAttractionTimer -= diff;
|
||||
|
||||
if (EternalAffectionTimer <= diff)
|
||||
{
|
||||
if (urand(0,1) && SummonedRomulo)
|
||||
if (urand(0, 1) && SummonedRomulo)
|
||||
{
|
||||
Creature* Romulo = (Unit::GetCreature((*me), RomuloGUID));
|
||||
if (Romulo && Romulo->isAlive() && !RomuloDead)
|
||||
DoCast(Romulo, SPELL_ETERNAL_AFFECTION);
|
||||
} else DoCast(me, SPELL_ETERNAL_AFFECTION);
|
||||
|
||||
EternalAffectionTimer = urand(45000,60000);
|
||||
EternalAffectionTimer = urand(45000, 60000);
|
||||
} else EternalAffectionTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
|
||||
// 1 - OZ, 2 - HOOD, 3 - RAJ, this never gets altered.
|
||||
m_uiOperaEvent = urand(1,3);
|
||||
m_uiOperaEvent = urand(1, 3);
|
||||
m_uiOzDeathCount = 0;
|
||||
|
||||
m_uiCurtainGUID = 0;
|
||||
@@ -149,7 +149,7 @@ public:
|
||||
case TYPE_NETHERSPITE: m_auiEncounter[8] = uiData; break;
|
||||
case TYPE_CHESS:
|
||||
if (uiData == DONE)
|
||||
DoRespawnGameObject(DustCoveredChest,DAY);
|
||||
DoRespawnGameObject(DustCoveredChest, DAY);
|
||||
m_auiEncounter[9] = uiData;
|
||||
break;
|
||||
case TYPE_MALCHEZZAR: m_auiEncounter[10] = uiData; break;
|
||||
|
||||
@@ -342,17 +342,17 @@ public:
|
||||
case GOSSIP_ACTION_INFO_DEF+3:
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pBarnesAI->m_uiEventId = EVENT_OZ;
|
||||
sLog->outString("TSCR: player (GUID " UI64FMTD ") manually set Opera event to EVENT_OZ",pPlayer->GetGUID());
|
||||
sLog->outString("TSCR: player (GUID " UI64FMTD ") manually set Opera event to EVENT_OZ", pPlayer->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+4:
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pBarnesAI->m_uiEventId = EVENT_HOOD;
|
||||
sLog->outString("TSCR: player (GUID " UI64FMTD ") manually set Opera event to EVENT_HOOD",pPlayer->GetGUID());
|
||||
sLog->outString("TSCR: player (GUID " UI64FMTD ") manually set Opera event to EVENT_HOOD", pPlayer->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+5:
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pBarnesAI->m_uiEventId = EVENT_RAJ;
|
||||
sLog->outString("TSCR: player (GUID " UI64FMTD ") manually set Opera event to EVENT_RAJ",pPlayer->GetGUID());
|
||||
sLog->outString("TSCR: player (GUID " UI64FMTD ") manually set Opera event to EVENT_RAJ", pPlayer->GetGUID());
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -375,7 +375,7 @@ public:
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_DOT, OZ_GM_GOSSIP3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
|
||||
}
|
||||
|
||||
if (npc_barnesAI* pBarnesAI = CAST_AI(npc_barnes::npc_barnesAI,pCreature->AI()))
|
||||
if (npc_barnesAI* pBarnesAI = CAST_AI(npc_barnes::npc_barnesAI, pCreature->AI()))
|
||||
{
|
||||
if (!pBarnesAI->RaidWiped)
|
||||
pPlayer->SEND_GOSSIP_MENU(8970, pCreature->GetGUID());
|
||||
@@ -459,8 +459,8 @@ public:
|
||||
#define SPELL_CONFLAGRATION_BLAST 30977
|
||||
#define SPELL_MANA_SHIELD 31635
|
||||
|
||||
static float MedivPos[4] = {-11161.49f,-1902.24f,91.48f,1.94f};
|
||||
static float ArcanagosPos[4] = {-11169.75f,-1881.48f,95.39f,4.83f};
|
||||
static float MedivPos[4] = {-11161.49f, -1902.24f, 91.48f, 1.94f};
|
||||
static float ArcanagosPos[4] = {-11169.75f, -1881.48f, 95.39f, 4.83f};
|
||||
|
||||
class npc_image_of_medivh : public CreatureScript
|
||||
{
|
||||
@@ -497,11 +497,11 @@ public:
|
||||
if (pInstance && pInstance->GetData64(DATA_IMAGE_OF_MEDIVH) == 0)
|
||||
{
|
||||
pInstance->SetData64(DATA_IMAGE_OF_MEDIVH, me->GetGUID());
|
||||
(*me).GetMotionMaster()->MovePoint(1,MedivPos[0],MedivPos[1],MedivPos[2]);
|
||||
(*me).GetMotionMaster()->MovePoint(1, MedivPos[0], MedivPos[1], MedivPos[2]);
|
||||
Step = 0;
|
||||
}else
|
||||
{
|
||||
me->DealDamage(me,me->GetHealth(),NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
me->DealDamage(me, me->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
me->RemoveCorpse();
|
||||
}
|
||||
}
|
||||
@@ -523,12 +523,12 @@ public:
|
||||
{
|
||||
Step = 1;
|
||||
EventStarted = true;
|
||||
Creature* Arcanagos = me->SummonCreature(MOB_ARCANAGOS,ArcanagosPos[0],ArcanagosPos[1],ArcanagosPos[2],0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000);
|
||||
Creature* Arcanagos = me->SummonCreature(MOB_ARCANAGOS, ArcanagosPos[0], ArcanagosPos[1], ArcanagosPos[2], 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000);
|
||||
if (!Arcanagos)
|
||||
return;
|
||||
ArcanagosGUID = Arcanagos->GetGUID();
|
||||
Arcanagos->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
|
||||
(*Arcanagos).GetMotionMaster()->MovePoint(0,ArcanagosPos[0],ArcanagosPos[1],ArcanagosPos[2]);
|
||||
(*Arcanagos).GetMotionMaster()->MovePoint(0, ArcanagosPos[0], ArcanagosPos[1], ArcanagosPos[2]);
|
||||
Arcanagos->SetOrientation(ArcanagosPos[3]);
|
||||
me->SetOrientation(MedivPos[3]);
|
||||
YellTimer = 10000;
|
||||
@@ -536,7 +536,7 @@ public:
|
||||
|
||||
uint32 NextStep(uint32 Step)
|
||||
{
|
||||
Unit* arca = Unit::GetUnit((*me),ArcanagosGUID);
|
||||
Unit* arca = Unit::GetUnit((*me), ArcanagosGUID);
|
||||
Map* pMap = me->GetMap();
|
||||
switch(Step)
|
||||
{
|
||||
@@ -581,7 +581,7 @@ public:
|
||||
CAST_CRE(arca)->MonsterYell(SAY_DIALOG_ARCANAGOS_8, LANG_UNIVERSAL, 0);
|
||||
return 5000;
|
||||
case 12:
|
||||
arca->GetMotionMaster()->MovePoint(0, -11010.82f,-1761.18f, 156.47f);
|
||||
arca->GetMotionMaster()->MovePoint(0, -11010.82f, -1761.18f, 156.47f);
|
||||
arca->setActive(true);
|
||||
arca->InterruptNonMeleeSpells(true);
|
||||
arca->SetSpeed(MOVE_FLIGHT, 2.0f);
|
||||
@@ -607,7 +607,7 @@ public:
|
||||
}
|
||||
return 50000;
|
||||
case 15:
|
||||
arca->DealDamage(arca,arca->GetHealth(),NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
arca->DealDamage(arca, arca->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
return 5000;
|
||||
default : return 9999999;
|
||||
}
|
||||
@@ -625,7 +625,7 @@ public:
|
||||
|
||||
if (Step >= 7 && Step <= 12)
|
||||
{
|
||||
Unit* arca = Unit::GetUnit((*me),ArcanagosGUID);
|
||||
Unit* arca = Unit::GetUnit((*me), ArcanagosGUID);
|
||||
|
||||
if (FireArcanagosTimer <= diff)
|
||||
{
|
||||
|
||||
@@ -296,15 +296,15 @@ public:
|
||||
if (FireballTimer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_FIREBALL_NORMAL);
|
||||
FireballTimer = urand(2000,6000);
|
||||
FireballTimer = urand(2000, 6000);
|
||||
} else FireballTimer -= diff;
|
||||
|
||||
if (PhoenixTimer <= diff)
|
||||
{
|
||||
|
||||
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,1);
|
||||
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1);
|
||||
|
||||
uint8 random = urand(1,2);
|
||||
uint8 random = urand(1, 2);
|
||||
float x = KaelLocations[random][0];
|
||||
float y = KaelLocations[random][1];
|
||||
|
||||
@@ -330,7 +330,7 @@ public:
|
||||
DoCast(pTarget, SPELL_FLAMESTRIKE3, true);
|
||||
DoScriptText(SAY_FLAMESTRIKE, me);
|
||||
}
|
||||
FlameStrikeTimer = urand(15000,25000);
|
||||
FlameStrikeTimer = urand(15000, 25000);
|
||||
} else FlameStrikeTimer -= diff;
|
||||
|
||||
// Below 50%
|
||||
@@ -396,7 +396,7 @@ public:
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
{
|
||||
Unit *pTarget = NULL;
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM,0);
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
|
||||
Creature* Orb = DoSpawnCreature(CREATURE_ARCANE_SPHERE, 5, 5, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000);
|
||||
if (Orb && pTarget)
|
||||
@@ -535,7 +535,7 @@ public:
|
||||
me->ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->ClearAllReactives();
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET,0);
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, 0);
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
me->SetStandState(UNIT_STAND_STATE_DEAD);
|
||||
@@ -580,7 +580,7 @@ public:
|
||||
if (BurnTimer <= diff)
|
||||
{
|
||||
//spell Burn should possible do this, but it doesn't, so do this for now.
|
||||
uint16 dmg = urand(1650,2050);
|
||||
uint16 dmg = urand(1650, 2050);
|
||||
me->DealDamage(me, dmg, 0, DOT, SPELL_SCHOOL_MASK_FIRE, NULL, false);
|
||||
BurnTimer += 2000;
|
||||
} BurnTimer -= diff;
|
||||
@@ -648,7 +648,7 @@ public:
|
||||
void Reset()
|
||||
{
|
||||
DespawnTimer = 30000;
|
||||
ChangeTargetTimer = urand(6000,12000);
|
||||
ChangeTargetTimer = urand(6000, 12000);
|
||||
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
|
||||
@@ -678,7 +678,7 @@ public:
|
||||
AttackStart(pTarget);
|
||||
}
|
||||
|
||||
ChangeTargetTimer = urand(5000,15000);
|
||||
ChangeTargetTimer = urand(5000, 15000);
|
||||
} else ChangeTargetTimer -= diff;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -274,7 +274,7 @@ public:
|
||||
{
|
||||
Unit *pTarget = me;
|
||||
|
||||
if (urand(0,1))
|
||||
if (urand(0, 1))
|
||||
if (Unit* pAdd = Unit::GetUnit(*me, m_auiLackeyGUID[rand()%MAX_ACTIVE_LACKEY]))
|
||||
if (pAdd->isAlive())
|
||||
pTarget = pAdd;
|
||||
@@ -287,7 +287,7 @@ public:
|
||||
{
|
||||
Unit *pTarget = me;
|
||||
|
||||
if (urand(0,1))
|
||||
if (urand(0, 1))
|
||||
if (Unit* pAdd = Unit::GetUnit(*me, m_auiLackeyGUID[rand()%MAX_ACTIVE_LACKEY]))
|
||||
if (pAdd->isAlive() && !pAdd->HasAura(SPELL_SHIELD))
|
||||
pTarget = pAdd;
|
||||
@@ -300,11 +300,11 @@ public:
|
||||
{
|
||||
Unit *pTarget = NULL;
|
||||
|
||||
if (urand(0,1))
|
||||
if (urand(0, 1))
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
|
||||
else
|
||||
{
|
||||
if (urand(0,1))
|
||||
if (urand(0, 1))
|
||||
pTarget = me;
|
||||
else
|
||||
if (Unit* pAdd = Unit::GetUnit(*me, m_auiLackeyGUID[rand()%MAX_ACTIVE_LACKEY]))
|
||||
@@ -362,7 +362,7 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI
|
||||
// For later development, some alternative threat system should be made
|
||||
// We do not know what this system is based upon, but one theory is class (healers=high threat, dps=medium, etc)
|
||||
// We reset their threat frequently as an alternative until such a system exist
|
||||
ResetThreatTimer = urand(5000,20000);
|
||||
ResetThreatTimer = urand(5000, 20000);
|
||||
|
||||
// in case she is not alive and Reset was for some reason called, respawn her (most likely party wipe after killing her)
|
||||
if (Creature* pDelrissa = Unit::GetCreature(*me, pInstance ? pInstance->GetData64(DATA_DELRISSA) : 0))
|
||||
@@ -1025,7 +1025,7 @@ public:
|
||||
Wing_Clip_Timer = 4000;
|
||||
Freezing_Trap_Timer = 15000;
|
||||
|
||||
Unit* pPet = Unit::GetUnit(*me,m_uiPetGUID);
|
||||
Unit* pPet = Unit::GetUnit(*me, m_uiPetGUID);
|
||||
if (!pPet)
|
||||
me->SummonCreature(NPC_SLIVER, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
|
||||
@@ -1155,7 +1155,7 @@ public:
|
||||
|
||||
if (Totem_Timer <= diff)
|
||||
{
|
||||
DoCast(me, RAND(SPELL_WINDFURY_TOTEM,SPELL_FIRE_NOVA_TOTEM,SPELL_EARTHBIND_TOTEM));
|
||||
DoCast(me, RAND(SPELL_WINDFURY_TOTEM, SPELL_FIRE_NOVA_TOTEM, SPELL_EARTHBIND_TOTEM));
|
||||
++Totem_Amount;
|
||||
Totem_Timer = Totem_Amount*2000;
|
||||
} else Totem_Timer -= diff;
|
||||
|
||||
@@ -203,7 +203,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit* /*victim*/)
|
||||
{
|
||||
DoScriptText(RAND(SAY_KILL_1,SAY_KILL_2), me);
|
||||
DoScriptText(RAND(SAY_KILL_1, SAY_KILL_2), me);
|
||||
}
|
||||
|
||||
void MovementInform(uint32 type, uint32 id)
|
||||
|
||||
@@ -118,10 +118,10 @@ public:
|
||||
void JustSummoned(Creature *summoned)
|
||||
{
|
||||
if (Unit *temp = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
summoned->GetMotionMaster()->MoveFollow(temp,0,0);
|
||||
summoned->GetMotionMaster()->MoveFollow(temp, 0, 0);
|
||||
|
||||
//spells are SUMMON_TYPE_GUARDIAN, so using setOwner should be ok
|
||||
summoned->CastSpell(summoned,SPELL_ENERGY_BOLT,false,0,0,me->GetGUID());
|
||||
summoned->CastSpell(summoned, SPELL_ENERGY_BOLT, false, 0, 0, me->GetGUID());
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
|
||||
@@ -209,7 +209,7 @@ class boss_ragnaros : public CreatureScript
|
||||
break;
|
||||
case EVENT_HAND_OF_RAGNAROS:
|
||||
DoCast(me, SPELL_HAND_OF_RAGNAROS);
|
||||
if (urand(0,1))
|
||||
if (urand(0, 1))
|
||||
DoScriptText(SAY_HAND, me);
|
||||
events.ScheduleEvent(EVENT_HAND_OF_RAGNAROS, 20000);
|
||||
break;
|
||||
@@ -260,7 +260,7 @@ class boss_ragnaros : public CreatureScript
|
||||
// summon 8 elementals
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Creature* pSummoned = me->SummonCreature(12143, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0.0f,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,900000))
|
||||
if (Creature* pSummoned = me->SummonCreature(12143, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 900000))
|
||||
pSummoned->AI()->AttackStart(pTarget);
|
||||
|
||||
_hasSubmergedOnce = true;
|
||||
@@ -275,7 +275,7 @@ class boss_ragnaros : public CreatureScript
|
||||
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Creature* pSummoned = me->SummonCreature(12143, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0.0f,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,900000))
|
||||
if (Creature* pSummoned = me->SummonCreature(12143, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 900000))
|
||||
pSummoned->AI()->AttackStart(pTarget);
|
||||
|
||||
_isBanished = true;
|
||||
|
||||
@@ -56,8 +56,8 @@ public:
|
||||
ai->Spell[0].First_Cast = 10000;
|
||||
ai->Spell[0].Cast_Target_Type = CAST_HOSTILE_TARGET;
|
||||
|
||||
uint32 RandDebuff = RAND(SPELL_GROUND_STOMP,SPELL_ANCIENT_DREAD,SPELL_CAUTERIZING_FLAMES,
|
||||
SPELL_WITHERING_HEAT,SPELL_ANCIENT_DESPAIR,SPELL_ANCIENT_HYSTERIA);
|
||||
uint32 RandDebuff = RAND(SPELL_GROUND_STOMP, SPELL_ANCIENT_DREAD, SPELL_CAUTERIZING_FLAMES,
|
||||
SPELL_WITHERING_HEAT, SPELL_ANCIENT_DESPAIR, SPELL_ANCIENT_HYSTERIA);
|
||||
|
||||
ai->Spell[1].Enabled = true;
|
||||
ai->Spell[1].Spell_Id = RandDebuff;
|
||||
|
||||
@@ -43,17 +43,17 @@ enum eDeathKnightSpells
|
||||
#define EVENT_BLOOD_STRIKE 3
|
||||
#define EVENT_DEATH_COIL 4
|
||||
|
||||
//used by 29519,29520,29565,29566,29567 but signed for 29519
|
||||
//used by 29519, 29520, 29565, 29566, 29567 but signed for 29519
|
||||
int32 say_event_start[8] =
|
||||
{
|
||||
-1609000,-1609001,-1609002,-1609003,
|
||||
-1609004,-1609005,-1609006,-1609007
|
||||
-1609000, -1609001, -1609002, -1609003,
|
||||
-1609004, -1609005, -1609006, -1609007
|
||||
};
|
||||
|
||||
int32 say_event_attack[9] =
|
||||
{
|
||||
-1609008,-1609009,-1609010,-1609011,-1609012,
|
||||
-1609013,-1609014,-1609015,-1609016
|
||||
-1609008, -1609009, -1609010, -1609011, -1609012,
|
||||
-1609013, -1609014, -1609015, -1609016
|
||||
};
|
||||
|
||||
uint32 acherus_soul_prison[12] =
|
||||
@@ -192,7 +192,7 @@ public:
|
||||
|
||||
for (uint8 i = 0; i < 12; ++i)
|
||||
{
|
||||
if (GameObject* temp_prison = me->FindNearestGameObject(acherus_soul_prison[i],30))
|
||||
if (GameObject* temp_prison = me->FindNearestGameObject(acherus_soul_prison[i], 30))
|
||||
{
|
||||
if (me->IsWithinDist(temp_prison, dist, false))
|
||||
{
|
||||
@@ -401,7 +401,7 @@ public:
|
||||
return true;
|
||||
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ACCEPT_DUEL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature),pCreature->GetGUID());
|
||||
pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -787,14 +787,14 @@ public:
|
||||
// Ghouls should display their Birth Animation
|
||||
// Crawling out of the ground
|
||||
//DoCast(me, 35177, true);
|
||||
//me->MonsterSay("Mommy?",LANG_UNIVERSAL,0);
|
||||
//me->MonsterSay("Mommy?", LANG_UNIVERSAL, 0);
|
||||
me->SetReactState(REACT_DEFENSIVE);
|
||||
}
|
||||
|
||||
void FindMinions(Unit *owner)
|
||||
{
|
||||
std::list<Creature*> MinionList;
|
||||
owner->GetAllMinionsByEntry(MinionList,GHOULS);
|
||||
owner->GetAllMinionsByEntry(MinionList, GHOULS);
|
||||
|
||||
if (!MinionList.empty())
|
||||
{
|
||||
@@ -959,7 +959,7 @@ public:
|
||||
AddWaypoint(11, 2202.595947f, -6061.325684f, 5.882018f);
|
||||
AddWaypoint(12, 2188.974609f, -6080.866699f, 3.370027f);
|
||||
|
||||
if (urand(0,1))
|
||||
if (urand(0, 1))
|
||||
{
|
||||
AddWaypoint(13, 2176.483887f, -6110.407227f, 1.855181f);
|
||||
AddWaypoint(14, 2172.516602f, -6146.752441f, 1.074235f);
|
||||
@@ -995,7 +995,7 @@ public:
|
||||
me->SetInFront(car);
|
||||
me->SendMovementFlagUpdate();
|
||||
}
|
||||
me->MonsterSay(SAY_SCARLET_MINER1,LANG_UNIVERSAL,0);
|
||||
me->MonsterSay(SAY_SCARLET_MINER1, LANG_UNIVERSAL, 0);
|
||||
SetRun(true);
|
||||
IntroTimer = 4000;
|
||||
IntroPhase = 1;
|
||||
@@ -1009,7 +1009,7 @@ public:
|
||||
car->SendMonsterStop();
|
||||
car->RemoveAura(SPELL_CART_DRAG);
|
||||
}
|
||||
me->MonsterSay(SAY_SCARLET_MINER2,LANG_UNIVERSAL,0);
|
||||
me->MonsterSay(SAY_SCARLET_MINER2, LANG_UNIVERSAL, 0);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -1059,7 +1059,7 @@ 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())
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include "ScriptedEscortAI.h"
|
||||
|
||||
//How to win friends and influence enemies
|
||||
// texts signed for creature 28939 but used for 28939,28940,28610
|
||||
// texts signed for creature 28939 but used for 28939, 28940, 28610
|
||||
enum win_friends
|
||||
{
|
||||
SAY_PERSUADE1 = -1609501,
|
||||
@@ -86,12 +86,12 @@ public:
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
DoCastAOE(58111, true);
|
||||
|
||||
DoScriptText(RAND(SAY_PERSUADE1,SAY_PERSUADE2,SAY_PERSUADE3,
|
||||
SAY_PERSUADE4,SAY_PERSUADE5,SAY_PERSUADE6,
|
||||
DoScriptText(RAND(SAY_PERSUADE1, SAY_PERSUADE2, SAY_PERSUADE3,
|
||||
SAY_PERSUADE4, SAY_PERSUADE5, SAY_PERSUADE6,
|
||||
SAY_PERSUADE7), caster);
|
||||
|
||||
DoScriptText(RAND(SAY_CRUSADER1,SAY_CRUSADER2,SAY_CRUSADER3,
|
||||
SAY_CRUSADER4,SAY_CRUSADER5,SAY_CRUSADER6), me);
|
||||
DoScriptText(RAND(SAY_CRUSADER1, SAY_CRUSADER2, SAY_CRUSADER3,
|
||||
SAY_CRUSADER4, SAY_CRUSADER5, SAY_CRUSADER6), me);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -183,7 +183,7 @@ public:
|
||||
{
|
||||
pCreature->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
|
||||
if (npc_escortAI* pEscortAI = CAST_AI(npc_koltira_deathweaver::npc_koltira_deathweaverAI,pCreature->AI()))
|
||||
if (npc_escortAI* pEscortAI = CAST_AI(npc_koltira_deathweaver::npc_koltira_deathweaverAI, pCreature->AI()))
|
||||
pEscortAI->Start(false, false, pPlayer->GetGUID());
|
||||
}
|
||||
return true;
|
||||
@@ -505,7 +505,7 @@ public:
|
||||
void Shout()
|
||||
{
|
||||
if (rand()%100 < 15)
|
||||
DoScriptText(RAND(SAY_VALROTH3,SAY_VALROTH4,SAY_VALROTH5), me);
|
||||
DoScriptText(RAND(SAY_VALROTH3, SAY_VALROTH4, SAY_VALROTH5), me);
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
@@ -520,7 +520,7 @@ public:
|
||||
/*######
|
||||
## npc_a_special_surprise
|
||||
######*/
|
||||
//used by 29032,29061,29065,29067,29068,29070,29074,29072,29073,29071 but signed for 29032
|
||||
//used by 29032, 29061, 29065, 29067, 29068, 29070, 29074, 29072, 29073, 29071 but signed for 29032
|
||||
enum SpecialSurprise
|
||||
{
|
||||
SAY_EXEC_START_1 = -1609025, // speech for all
|
||||
|
||||
@@ -243,7 +243,7 @@ void UpdateWorldState(Map *map, uint32 id, uint32 state)
|
||||
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
{
|
||||
if (Player* pPlayer = itr->getSource())
|
||||
pPlayer->SendUpdateWorldState(id,state);
|
||||
pPlayer->SendUpdateWorldState(id, state);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -377,11 +377,11 @@ public:
|
||||
uiTotal_scourge = ENCOUNTER_TOTAL_SCOURGE;
|
||||
uiSummon_counter = 0;
|
||||
|
||||
uiAnti_magic_zone = urand(1000,6000);
|
||||
uiDeath_strike = urand(5000,10000);
|
||||
uiDeath_embrace = urand(5000,10000);
|
||||
uiIcy_touch = urand(5000,10000);
|
||||
uiUnholy_blight = urand(5000,10000);
|
||||
uiAnti_magic_zone = urand(1000, 6000);
|
||||
uiDeath_strike = urand(5000, 10000);
|
||||
uiDeath_embrace = urand(5000, 10000);
|
||||
uiIcy_touch = urand(5000, 10000);
|
||||
uiUnholy_blight = urand(5000, 10000);
|
||||
|
||||
uiFight_speech = 15000;
|
||||
uiSpawncheck = 1000;
|
||||
@@ -1381,11 +1381,11 @@ public:
|
||||
|
||||
if (uiFight_speech <= diff)
|
||||
{
|
||||
DoScriptText(RAND(SAY_LIGHT_OF_DAWN09,SAY_LIGHT_OF_DAWN10,SAY_LIGHT_OF_DAWN11,
|
||||
SAY_LIGHT_OF_DAWN12,SAY_LIGHT_OF_DAWN13,SAY_LIGHT_OF_DAWN14,
|
||||
SAY_LIGHT_OF_DAWN15,SAY_LIGHT_OF_DAWN16,SAY_LIGHT_OF_DAWN17,
|
||||
SAY_LIGHT_OF_DAWN18,SAY_LIGHT_OF_DAWN19,SAY_LIGHT_OF_DAWN20,
|
||||
SAY_LIGHT_OF_DAWN21,SAY_LIGHT_OF_DAWN22,SAY_LIGHT_OF_DAWN23,
|
||||
DoScriptText(RAND(SAY_LIGHT_OF_DAWN09, SAY_LIGHT_OF_DAWN10, SAY_LIGHT_OF_DAWN11,
|
||||
SAY_LIGHT_OF_DAWN12, SAY_LIGHT_OF_DAWN13, SAY_LIGHT_OF_DAWN14,
|
||||
SAY_LIGHT_OF_DAWN15, SAY_LIGHT_OF_DAWN16, SAY_LIGHT_OF_DAWN17,
|
||||
SAY_LIGHT_OF_DAWN18, SAY_LIGHT_OF_DAWN19, SAY_LIGHT_OF_DAWN20,
|
||||
SAY_LIGHT_OF_DAWN21, SAY_LIGHT_OF_DAWN22, SAY_LIGHT_OF_DAWN23,
|
||||
SAY_LIGHT_OF_DAWN24), me);
|
||||
uiFight_speech = 15000 + rand()%5000;
|
||||
} else uiFight_speech -= diff;
|
||||
@@ -1535,7 +1535,7 @@ public:
|
||||
{
|
||||
if (Creature* pTemp = Unit::GetCreature(*me, ui_GUID))
|
||||
if (pTemp->isAlive())
|
||||
if (Unit* pTarger = SelectTarget(SELECT_TARGET_RANDOM,0))
|
||||
if (Unit* pTarger = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (pTarger->isAlive())
|
||||
{
|
||||
// pTemp->DeleteThreatList();
|
||||
|
||||
@@ -77,7 +77,7 @@ public:
|
||||
FlyBackTimer = 500;
|
||||
break;
|
||||
case 1:
|
||||
plr->GetClosePoint(x,y,z, me->GetObjectSize());
|
||||
plr->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());
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -89,33 +89,33 @@ struct Locations
|
||||
|
||||
static Locations FlightPoint[]=
|
||||
{
|
||||
{1754.00f,1346.00f,17.50f},
|
||||
{1765.00f,1347.00f,19.00f},
|
||||
{1784.00f,1346.80f,25.40f},
|
||||
{1803.30f,1347.60f,33.00f},
|
||||
{1824.00f,1350.00f,42.60f},
|
||||
{1838.80f,1353.20f,49.80f},
|
||||
{1852.00f,1357.60f,55.70f},
|
||||
{1861.30f,1364.00f,59.40f},
|
||||
{1866.30f,1374.80f,61.70f},
|
||||
{1864.00f,1387.30f,63.20f},
|
||||
{1854.80f,1399.40f,64.10f},
|
||||
{1844.00f,1406.90f,64.10f},
|
||||
{1824.30f,1411.40f,63.30f},
|
||||
{1801.00f,1412.30f,60.40f},
|
||||
{1782.00f,1410.10f,55.50f},
|
||||
{1770.50f,1405.20f,50.30f},
|
||||
{1765.20f,1400.70f,46.60f},
|
||||
{1761.40f,1393.40f,41.70f},
|
||||
{1759.10f,1386.70f,36.60f},
|
||||
{1757.80f,1378.20f,29.00f},
|
||||
{1758.00f,1367.00f,19.51f}
|
||||
{1754.00f, 1346.00f, 17.50f},
|
||||
{1765.00f, 1347.00f, 19.00f},
|
||||
{1784.00f, 1346.80f, 25.40f},
|
||||
{1803.30f, 1347.60f, 33.00f},
|
||||
{1824.00f, 1350.00f, 42.60f},
|
||||
{1838.80f, 1353.20f, 49.80f},
|
||||
{1852.00f, 1357.60f, 55.70f},
|
||||
{1861.30f, 1364.00f, 59.40f},
|
||||
{1866.30f, 1374.80f, 61.70f},
|
||||
{1864.00f, 1387.30f, 63.20f},
|
||||
{1854.80f, 1399.40f, 64.10f},
|
||||
{1844.00f, 1406.90f, 64.10f},
|
||||
{1824.30f, 1411.40f, 63.30f},
|
||||
{1801.00f, 1412.30f, 60.40f},
|
||||
{1782.00f, 1410.10f, 55.50f},
|
||||
{1770.50f, 1405.20f, 50.30f},
|
||||
{1765.20f, 1400.70f, 46.60f},
|
||||
{1761.40f, 1393.40f, 41.70f},
|
||||
{1759.10f, 1386.70f, 36.60f},
|
||||
{1757.80f, 1378.20f, 29.00f},
|
||||
{1758.00f, 1367.00f, 19.51f}
|
||||
};
|
||||
|
||||
static Locations Spawn[]=
|
||||
{
|
||||
{1776.27f,1348.74f,19.20f}, //spawn point for pumpkin shrine mob
|
||||
{1765.28f,1347.46f,17.55f} //spawn point for smoke
|
||||
{1776.27f, 1348.74f, 19.20f}, //spawn point for pumpkin shrine mob
|
||||
{1765.28f, 1347.46f, 17.55f} //spawn point for smoke
|
||||
};
|
||||
|
||||
static const char* Text[]=
|
||||
@@ -245,7 +245,7 @@ public:
|
||||
die = false;
|
||||
withbody = true;
|
||||
wait = 1000;
|
||||
laugh = urand(15000,30000);
|
||||
laugh = urand(15000, 30000);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/) {}
|
||||
@@ -253,13 +253,13 @@ public:
|
||||
{
|
||||
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);
|
||||
speaker->CastSpell(speaker, SPELL_HEAD_SPEAKS, false);
|
||||
laugh += 3000;
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* /*done_by*/,uint32 &damage)
|
||||
void DamageTaken(Unit* /*done_by*/, uint32 &damage)
|
||||
{
|
||||
if (withbody)
|
||||
return;
|
||||
@@ -327,13 +327,13 @@ public:
|
||||
|
||||
if (laugh <= diff)
|
||||
{
|
||||
laugh = urand(15000,30000);
|
||||
DoPlaySoundToSet(me, RandomLaugh[urand(0,2)]);
|
||||
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);
|
||||
speaker->CastSpell(speaker, SPELL_HEAD_SPEAKS, false);
|
||||
me->MonsterTextEmote(EMOTE_LAUGHS, 0);
|
||||
} else laugh -= diff;
|
||||
}
|
||||
else
|
||||
@@ -400,7 +400,7 @@ public:
|
||||
Phase = 1;
|
||||
conflagrate = 15000;
|
||||
summonadds = 15000;
|
||||
laugh = urand(16000,20000);
|
||||
laugh = urand(16000, 20000);
|
||||
cleave = 2000;
|
||||
regen = 1000;
|
||||
burn = 6000;
|
||||
@@ -429,7 +429,7 @@ public:
|
||||
me->SetVisible(false);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT | MOVEMENTFLAG_LEVITATING);
|
||||
me->SetSpeed(MOVE_WALK,5.0f,true);
|
||||
me->SetSpeed(MOVE_WALK, 5.0f, true);
|
||||
wp_reached = false;
|
||||
count = 0;
|
||||
say_timer = 3000;
|
||||
@@ -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,7 +470,7 @@ public:
|
||||
wp_reached = false;
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
SaySound(SAY_ENTRANCE);
|
||||
if (Unit *plr = Unit::GetUnit((*me),PlayerGUID))
|
||||
if (Unit *plr = Unit::GetUnit((*me), PlayerGUID))
|
||||
DoStartMovement(plr);
|
||||
break;
|
||||
}
|
||||
@@ -537,7 +537,7 @@ public:
|
||||
void SpellHitTarget(Unit* unit, const SpellEntry* spell)
|
||||
{
|
||||
if (spell->Id == SPELL_CONFLAGRATION && unit->HasAura(SPELL_CONFLAGRATION))
|
||||
SaySound(SAY_CONFLAGRATION,unit);
|
||||
SaySound(SAY_CONFLAGRATION, unit);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
@@ -545,9 +545,9 @@ public:
|
||||
me->StopMoving();
|
||||
//me->GetMotionMaster()->MoveIdle();
|
||||
SaySound(SAY_DEATH);
|
||||
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 *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))
|
||||
CAST_AI(mob_wisp_invis::mob_wisp_invisAI, wisp->AI())->SetType(4);
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_HORSEMAN_EVENT, DONE);
|
||||
@@ -571,14 +571,14 @@ public:
|
||||
SaySound(SAY_REJOINED);
|
||||
DoCast(me, SPELL_HEAD);
|
||||
caster->GetMotionMaster()->Clear(false);
|
||||
caster->GetMotionMaster()->MoveFollow(me,6,float(urand(0,5)));
|
||||
caster->GetMotionMaster()->MoveFollow(me, 6, float(urand(0, 5)));
|
||||
//DoResetThreat();//not sure if need
|
||||
std::list<HostileReference*>::const_iterator itr;
|
||||
for (itr = caster->getThreatManager().getThreatList().begin(); itr != caster->getThreatManager().getThreatList().end(); ++itr)
|
||||
{
|
||||
Unit* pUnit = Unit::GetUnit((*me), (*itr)->getUnitGuid());
|
||||
if (pUnit && pUnit->isAlive() && pUnit != caster)
|
||||
me->AddThreat(pUnit,caster->getThreatManager().getThreat(pUnit));
|
||||
me->AddThreat(pUnit, caster->getThreatManager().getThreat(pUnit));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -594,19 +594,19 @@ public:
|
||||
me->SetName("Headless Horseman, Unhorsed");
|
||||
|
||||
if (!headGUID)
|
||||
headGUID = DoSpawnCreature(HEAD, float(rand()%6), float(rand()%6),0,0,TEMPSUMMON_DEAD_DESPAWN,0)->GetGUID();
|
||||
headGUID = DoSpawnCreature(HEAD, float(rand()%6), float(rand()%6), 0, 0, TEMPSUMMON_DEAD_DESPAWN, 0)->GetGUID();
|
||||
Unit* Head = Unit::GetUnit((*me), headGUID);
|
||||
if (Head && Head->isAlive())
|
||||
{
|
||||
Head->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
//Head->CastSpell(Head,SPELL_HEAD_INVIS,false);
|
||||
//Head->CastSpell(Head, SPELL_HEAD_INVIS, false);
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
DoCast(me, SPELL_IMMUNE, true);
|
||||
DoCast(me, SPELL_BODY_REGEN, true);
|
||||
DoCast(Head, SPELL_FLYING_HEAD, true);
|
||||
DoCast(me, SPELL_CONFUSE, false); //test
|
||||
done_by->ProcDamageAndSpell(me,PROC_FLAG_KILL,PROC_FLAG_KILLED,PROC_EX_NONE,0);
|
||||
whirlwind = urand(4000,8000);
|
||||
done_by->ProcDamageAndSpell(me, PROC_FLAG_KILL, PROC_FLAG_KILLED, PROC_EX_NONE, 0);
|
||||
whirlwind = urand(4000, 8000);
|
||||
regen = 0;
|
||||
}
|
||||
}
|
||||
@@ -653,7 +653,7 @@ public:
|
||||
{
|
||||
wp_reached = false;
|
||||
me->GetMotionMaster()->Clear(false);
|
||||
me->GetMotionMaster()->MovePoint(id,FlightPoint[id].x,FlightPoint[id].y,FlightPoint[id].z);
|
||||
me->GetMotionMaster()->MovePoint(id, FlightPoint[id].x, FlightPoint[id].y, FlightPoint[id].z);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
@@ -673,7 +673,7 @@ public:
|
||||
{
|
||||
if (Unit *plr = SelectRandomPlayer(30.0f))
|
||||
DoCast(plr, SPELL_CONFLAGRATION, false);
|
||||
conflagrate = urand(10000,16000);
|
||||
conflagrate = urand(10000, 16000);
|
||||
} else conflagrate -= diff;
|
||||
break;
|
||||
case 3:
|
||||
@@ -682,15 +682,15 @@ public:
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
DoCast(me, SPELL_SUMMON_PUMPKIN);
|
||||
SaySound(SAY_SPROUTING_PUMPKINS);
|
||||
summonadds = urand(25000,35000);
|
||||
summonadds = urand(25000, 35000);
|
||||
} else summonadds -= diff;
|
||||
break;
|
||||
}
|
||||
|
||||
if (laugh <= diff)
|
||||
{
|
||||
laugh = urand(11000,22000);
|
||||
me->MonsterTextEmote(EMOTE_LAUGHS,0);
|
||||
laugh = urand(11000, 22000);
|
||||
me->MonsterTextEmote(EMOTE_LAUGHS, 0);
|
||||
DoPlaySoundToSet(me, RandomLaugh[rand()%3]);
|
||||
} else laugh -= diff;
|
||||
|
||||
@@ -700,7 +700,7 @@ public:
|
||||
if (cleave <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_CLEAVE);
|
||||
cleave = urand(2000,6000); //1 cleave per 2.0f-6.0fsec
|
||||
cleave = urand(2000, 6000); //1 cleave per 2.0f-6.0fsec
|
||||
} else cleave -= diff;
|
||||
}
|
||||
}
|
||||
@@ -728,8 +728,8 @@ public:
|
||||
|
||||
if (whirlwind <= diff)
|
||||
{
|
||||
whirlwind = urand(4000,8000);
|
||||
if (urand(0,1))
|
||||
whirlwind = urand(4000, 8000);
|
||||
if (urand(0, 1))
|
||||
{
|
||||
me->RemoveAurasDueToSpell(SPELL_CONFUSE);
|
||||
DoCast(me, SPELL_WHIRLWIND, true);
|
||||
@@ -764,20 +764,20 @@ public:
|
||||
{
|
||||
float x, y, z;
|
||||
me->GetPosition(x, y, z); //this visual aura some under ground
|
||||
me->GetMap()->CreatureRelocation(me, x,y,z + 0.35f, 0.0f);
|
||||
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());
|
||||
debuff->CastSpell(debuff,SPELL_PUMPKIN_AURA_GREEN,false);
|
||||
debuff->CastSpell(debuff, SPELL_PUMPKIN_AURA_GREEN, false);
|
||||
CAST_AI(mob_wisp_invis::mob_wisp_invisAI, debuff->AI())->SetType(1);
|
||||
debuffGUID = debuff->GetGUID();
|
||||
}
|
||||
sprouted = false;
|
||||
DoCast(me, SPELL_PUMPKIN_AURA, true);
|
||||
DoCast(me, SPELL_SPROUTING);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_STUNNED);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/){}
|
||||
@@ -788,7 +788,7 @@ public:
|
||||
{
|
||||
sprouted = true;
|
||||
me->RemoveAllAuras();
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_STUNNED);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED);
|
||||
DoCast(me, SPELL_SPROUT_BODY, true);
|
||||
me->UpdateEntry(PUMPKIN_FIEND);
|
||||
DoStartMovement(me->getVictim());
|
||||
@@ -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;
|
||||
@@ -811,7 +811,7 @@ public:
|
||||
if (!who || !who->isTargetableForAttack() || !me->IsHostileTo(who) || me->getVictim())
|
||||
return;
|
||||
|
||||
me->AddThreat(who,0.0f);
|
||||
me->AddThreat(who, 0.0f);
|
||||
if (sprouted)
|
||||
DoStartMovement(who);
|
||||
}
|
||||
@@ -847,7 +847,7 @@ public:
|
||||
if (plr->GetQuestStatus(11405) == QUEST_STATUS_INCOMPLETE && plr->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();
|
||||
|
||||
@@ -132,7 +132,7 @@ public:
|
||||
{
|
||||
mob_scarlet_traineeAI(Creature *c) : npc_escortAI(c)
|
||||
{
|
||||
Start_Timer = urand(1000,6000);
|
||||
Start_Timer = urand(1000, 6000);
|
||||
}
|
||||
|
||||
uint32 Start_Timer;
|
||||
@@ -147,7 +147,7 @@ public:
|
||||
{
|
||||
if (Start_Timer <= diff)
|
||||
{
|
||||
Start(true,true);
|
||||
Start(true, true);
|
||||
Start_Timer = 0;
|
||||
} else Start_Timer -= diff;
|
||||
}
|
||||
|
||||
+3
-3
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ public:
|
||||
|
||||
if (m_pInstance)
|
||||
if (me->isAlive())
|
||||
m_pInstance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT,NOT_STARTED);
|
||||
m_pInstance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, NOT_STARTED);
|
||||
|
||||
m_bHasDied = false;
|
||||
m_bHeal = false;
|
||||
@@ -133,7 +133,7 @@ public:
|
||||
{
|
||||
m_pInstance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, IN_PROGRESS);
|
||||
|
||||
Whitemane->GetMotionMaster()->MovePoint(1,1163.113370f,1398.856812f,32.527786f);
|
||||
Whitemane->GetMotionMaster()->MovePoint(1, 1163.113370f, 1398.856812f, 32.527786f);
|
||||
|
||||
me->GetMotionMaster()->MovementExpired();
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
|
||||
@@ -125,7 +125,7 @@ public:
|
||||
if (Teleport_Timer <= diff)
|
||||
{
|
||||
Unit *pTarget = NULL;
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM,0);
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
if (DoGetThreat(pTarget))
|
||||
@@ -135,80 +135,80 @@ public:
|
||||
switch(rand()%6)
|
||||
{
|
||||
case 0:
|
||||
DoTeleportPlayer(pTarget, 250.0696f,0.3921f,84.8408f,3.149f);
|
||||
Summoned = me->SummonCreature(16119,254.2325f,0.3417f,84.8407f,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000);
|
||||
DoTeleportPlayer(pTarget, 250.0696f, 0.3921f, 84.8408f, 3.149f);
|
||||
Summoned = me->SummonCreature(16119, 254.2325f, 0.3417f, 84.8407f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
|
||||
if (Summoned)
|
||||
Summoned->AI()->AttackStart(pTarget);
|
||||
Summoned = me->SummonCreature(16119,257.7133f,4.0226f,84.8407f,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000);
|
||||
Summoned = me->SummonCreature(16119, 257.7133f, 4.0226f, 84.8407f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
|
||||
if (Summoned)
|
||||
Summoned->AI()->AttackStart(pTarget);
|
||||
Summoned = me->SummonCreature(16119,258.6702f,-2.60656f,84.8407f,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000);
|
||||
Summoned = me->SummonCreature(16119, 258.6702f, -2.60656f, 84.8407f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
|
||||
if (Summoned)
|
||||
Summoned->AI()->AttackStart(pTarget);
|
||||
break;
|
||||
case 1:
|
||||
DoTeleportPlayer(pTarget, 181.4220f,-91.9481f,84.8410f,1.608f);
|
||||
Summoned = me->SummonCreature(16119,184.0519f,-73.5649f,84.8407f,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000);
|
||||
DoTeleportPlayer(pTarget, 181.4220f, -91.9481f, 84.8410f, 1.608f);
|
||||
Summoned = me->SummonCreature(16119, 184.0519f, -73.5649f, 84.8407f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
|
||||
if (Summoned)
|
||||
Summoned->AI()->AttackStart(pTarget);
|
||||
Summoned = me->SummonCreature(16119,179.5951f,-73.7045f,84.8407f,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000);
|
||||
Summoned = me->SummonCreature(16119, 179.5951f, -73.7045f, 84.8407f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
|
||||
if (Summoned)
|
||||
Summoned->AI()->AttackStart(pTarget);
|
||||
Summoned = me->SummonCreature(16119,180.6452f,-78.2143f,84.8407f,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000);
|
||||
Summoned = me->SummonCreature(16119, 180.6452f, -78.2143f, 84.8407f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
|
||||
if (Summoned)
|
||||
Summoned->AI()->AttackStart(pTarget);
|
||||
Summoned = me->SummonCreature(16119,283.2274f,-78.1518f,84.8407f,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000);
|
||||
Summoned = me->SummonCreature(16119, 283.2274f, -78.1518f, 84.8407f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
|
||||
if (Summoned)
|
||||
Summoned->AI()->AttackStart(pTarget);
|
||||
break;
|
||||
case 2:
|
||||
DoTeleportPlayer(pTarget, 95.1547f,-1.8173f,85.2289f,0.043f);
|
||||
Summoned = me->SummonCreature(16119,100.9404f,-1.8016f,85.2289f,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000);
|
||||
DoTeleportPlayer(pTarget, 95.1547f, -1.8173f, 85.2289f, 0.043f);
|
||||
Summoned = me->SummonCreature(16119, 100.9404f, -1.8016f, 85.2289f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
|
||||
if (Summoned)
|
||||
Summoned->AI()->AttackStart(pTarget);
|
||||
Summoned = me->SummonCreature(16119,101.3729f,0.4882f,85.2289f,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000);
|
||||
Summoned = me->SummonCreature(16119, 101.3729f, 0.4882f, 85.2289f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
|
||||
if (Summoned)
|
||||
Summoned->AI()->AttackStart(pTarget);
|
||||
Summoned = me->SummonCreature(16119,101.4596f,-4.4740f,85.2289f,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000);
|
||||
Summoned = me->SummonCreature(16119, 101.4596f, -4.4740f, 85.2289f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
|
||||
if (Summoned)
|
||||
Summoned->AI()->AttackStart(pTarget);
|
||||
break;
|
||||
case 3:
|
||||
DoTeleportPlayer(pTarget, 250.0696f,0.3921f,72.6722f,3.149f);
|
||||
Summoned = me->SummonCreature(16119,240.34481f,0.7368f,72.6722f,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000);
|
||||
DoTeleportPlayer(pTarget, 250.0696f, 0.3921f, 72.6722f, 3.149f);
|
||||
Summoned = me->SummonCreature(16119, 240.34481f, 0.7368f, 72.6722f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
|
||||
if (Summoned)
|
||||
Summoned->AI()->AttackStart(pTarget);
|
||||
Summoned = me->SummonCreature(16119,240.3633f,-2.9520f,72.6722f,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000);
|
||||
Summoned = me->SummonCreature(16119, 240.3633f, -2.9520f, 72.6722f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
|
||||
if (Summoned)
|
||||
Summoned->AI()->AttackStart(pTarget);
|
||||
Summoned = me->SummonCreature(16119,240.6702f,3.34949f,72.6722f,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000);
|
||||
Summoned = me->SummonCreature(16119, 240.6702f, 3.34949f, 72.6722f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
|
||||
if (Summoned)
|
||||
Summoned->AI()->AttackStart(pTarget);
|
||||
break;
|
||||
case 4:
|
||||
DoTeleportPlayer(pTarget, 181.4220f,-91.9481f,70.7734f,1.608f);
|
||||
Summoned = me->SummonCreature(16119,184.0519f,-73.5649f,70.7734f,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000);
|
||||
DoTeleportPlayer(pTarget, 181.4220f, -91.9481f, 70.7734f, 1.608f);
|
||||
Summoned = me->SummonCreature(16119, 184.0519f, -73.5649f, 70.7734f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
|
||||
if (Summoned)
|
||||
Summoned->AI()->AttackStart(pTarget);
|
||||
Summoned = me->SummonCreature(16119,179.5951f,-73.7045f,70.7734f,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000);
|
||||
Summoned = me->SummonCreature(16119, 179.5951f, -73.7045f, 70.7734f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
|
||||
if (Summoned)
|
||||
Summoned->AI()->AttackStart(pTarget);
|
||||
Summoned = me->SummonCreature(16119,180.6452f,-78.2143f,70.7734f,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000);
|
||||
Summoned = me->SummonCreature(16119, 180.6452f, -78.2143f, 70.7734f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
|
||||
if (Summoned)
|
||||
Summoned->AI()->AttackStart(pTarget);
|
||||
Summoned = me->SummonCreature(16119,283.2274f,-78.1518f,70.7734f,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000);
|
||||
Summoned = me->SummonCreature(16119, 283.2274f, -78.1518f, 70.7734f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
|
||||
if (Summoned)
|
||||
Summoned->AI()->AttackStart(pTarget);
|
||||
break;
|
||||
case 5:
|
||||
DoTeleportPlayer(pTarget, 106.1541f,-1.8994f,75.3663f,0.043f);
|
||||
Summoned = me->SummonCreature(16119,115.3945f,-1.5555f,75.3663f,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000);
|
||||
DoTeleportPlayer(pTarget, 106.1541f, -1.8994f, 75.3663f, 0.043f);
|
||||
Summoned = me->SummonCreature(16119, 115.3945f, -1.5555f, 75.3663f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
|
||||
if (Summoned)
|
||||
Summoned->AI()->AttackStart(pTarget);
|
||||
Summoned = me->SummonCreature(16119,257.7133f,1.8066f,75.3663f,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000);
|
||||
Summoned = me->SummonCreature(16119, 257.7133f, 1.8066f, 75.3663f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
|
||||
if (Summoned)
|
||||
Summoned->AI()->AttackStart(pTarget);
|
||||
Summoned = me->SummonCreature(16119,258.6702f,-5.1001f,75.3663f,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000);
|
||||
Summoned = me->SummonCreature(16119, 258.6702f, -5.1001f, 75.3663f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
|
||||
if (Summoned)
|
||||
Summoned->AI()->AttackStart(pTarget);
|
||||
break;
|
||||
|
||||
@@ -90,7 +90,7 @@ public:
|
||||
if (ShadowShock_Timer <= diff)
|
||||
{
|
||||
Unit *pTarget = NULL;
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM,0);
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (pTarget) DoCast(pTarget, SPELL_SHADOWSHOCK);
|
||||
|
||||
ShadowShock_Timer = 12000;
|
||||
|
||||
@@ -97,7 +97,7 @@ public:
|
||||
if (Corruption_Timer <= diff)
|
||||
{
|
||||
Unit *pTarget = NULL;
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM,0);
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (pTarget) DoCast(pTarget, SPELL_CORRUPTION);
|
||||
|
||||
Corruption_Timer = 24000;
|
||||
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
|
||||
void SummonIllusions(Unit* victim)
|
||||
{
|
||||
if (Creature *Illusion = DoSpawnCreature(11439, float(irand(-9,9)), float(irand(-9,9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000))
|
||||
if (Creature *Illusion = DoSpawnCreature(11439, float(irand(-9, 9)), float(irand(-9, 9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000))
|
||||
Illusion->AI()->AttackStart(victim);
|
||||
}
|
||||
|
||||
@@ -108,13 +108,13 @@ public:
|
||||
me->setFaction(35);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetDisplayId(11686); // Invisible Model
|
||||
DoModifyThreatPercent(me->getVictim(),-99);
|
||||
DoModifyThreatPercent(me->getVictim(), -99);
|
||||
|
||||
//Summon 10 Illusions attacking random gamers
|
||||
Unit *pTarget = NULL;
|
||||
for (uint8 i = 0; i < 10; ++i)
|
||||
{
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM,0);
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (pTarget)
|
||||
SummonIllusions(pTarget);
|
||||
}
|
||||
|
||||
@@ -63,13 +63,13 @@ public:
|
||||
|
||||
void SummonMinions(Unit* victim)
|
||||
{
|
||||
if (Creature *SummonedMinion = DoSpawnCreature(16119, float(irand(-7,7)), float(irand(-7,7)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000))
|
||||
if (Creature *SummonedMinion = DoSpawnCreature(16119, float(irand(-7, 7)), float(irand(-7, 7)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000))
|
||||
SummonedMinion->AI()->AttackStart(victim);
|
||||
}
|
||||
|
||||
void SummonMages(Unit* victim)
|
||||
{
|
||||
if (Creature *SummonedMage = DoSpawnCreature(16120, float(irand(-9,9)), float(irand(-9,9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000))
|
||||
if (Creature *SummonedMage = DoSpawnCreature(16120, float(irand(-9, 9)), float(irand(-9, 9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000))
|
||||
SummonedMage->AI()->AttackStart(victim);
|
||||
}
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
if (Immolate_Timer <= diff)
|
||||
{
|
||||
Unit *pTarget = NULL;
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM,0);
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (pTarget) DoCast(pTarget, SPELL_IMMOLATE);
|
||||
|
||||
Immolate_Timer = 12000;
|
||||
|
||||
@@ -48,11 +48,11 @@ enum eEnums
|
||||
|
||||
const Position SpawnLocation[] =
|
||||
{
|
||||
{-148.199f,2165.647f,128.448f,1.026f},
|
||||
{-153.110f,2168.620f,128.448f,1.026f},
|
||||
{-145.905f,2180.520f,128.448f,4.183f},
|
||||
{-140.794f,2178.037f,128.448f,4.090f},
|
||||
{-138.640f,2170.159f,136.577f,2.737f}
|
||||
{-148.199f, 2165.647f, 128.448f, 1.026f},
|
||||
{-153.110f, 2168.620f, 128.448f, 1.026f},
|
||||
{-145.905f, 2180.520f, 128.448f, 4.183f},
|
||||
{-140.794f, 2178.037f, 128.448f, 4.090f},
|
||||
{-138.640f, 2170.159f, 136.577f, 2.737f}
|
||||
};
|
||||
class instance_shadowfang_keep : public InstanceMapScript
|
||||
{
|
||||
@@ -137,8 +137,8 @@ public:
|
||||
|
||||
if (pAda && pAda->isAlive() && pAsh && pAsh->isAlive())
|
||||
{
|
||||
DoScriptText(SAY_BOSS_DIE_AD,pAda);
|
||||
DoScriptText(SAY_BOSS_DIE_AS,pAsh);
|
||||
DoScriptText(SAY_BOSS_DIE_AD, pAda);
|
||||
DoScriptText(SAY_BOSS_DIE_AS, pAsh);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -251,19 +251,19 @@ public:
|
||||
switch(uiPhase)
|
||||
{
|
||||
case 1:
|
||||
pSummon = pArchmage->SummonCreature(pArchmage->GetEntry(),SpawnLocation[4],TEMPSUMMON_TIMED_DESPAWN,10000);
|
||||
pSummon = pArchmage->SummonCreature(pArchmage->GetEntry(), SpawnLocation[4], TEMPSUMMON_TIMED_DESPAWN, 10000);
|
||||
pSummon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
|
||||
pSummon->SetReactState(REACT_DEFENSIVE);
|
||||
pSummon->CastSpell(pSummon,SPELL_ASHCROMBE_TELEPORT,true);
|
||||
DoScriptText(SAY_ARCHMAGE,pSummon);
|
||||
pSummon->CastSpell(pSummon, SPELL_ASHCROMBE_TELEPORT, true);
|
||||
DoScriptText(SAY_ARCHMAGE, pSummon);
|
||||
uiTimer = 2000;
|
||||
uiPhase = 2;
|
||||
break;
|
||||
case 2:
|
||||
pArchmage->SummonCreature(NPC_ARUGAL_VOIDWALKER,SpawnLocation[0],TEMPSUMMON_CORPSE_TIMED_DESPAWN,60000);
|
||||
pArchmage->SummonCreature(NPC_ARUGAL_VOIDWALKER,SpawnLocation[1],TEMPSUMMON_CORPSE_TIMED_DESPAWN,60000);
|
||||
pArchmage->SummonCreature(NPC_ARUGAL_VOIDWALKER,SpawnLocation[2],TEMPSUMMON_CORPSE_TIMED_DESPAWN,60000);
|
||||
pArchmage->SummonCreature(NPC_ARUGAL_VOIDWALKER,SpawnLocation[3],TEMPSUMMON_CORPSE_TIMED_DESPAWN,60000);
|
||||
pArchmage->SummonCreature(NPC_ARUGAL_VOIDWALKER, SpawnLocation[0], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60000);
|
||||
pArchmage->SummonCreature(NPC_ARUGAL_VOIDWALKER, SpawnLocation[1], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60000);
|
||||
pArchmage->SummonCreature(NPC_ARUGAL_VOIDWALKER, SpawnLocation[2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60000);
|
||||
pArchmage->SummonCreature(NPC_ARUGAL_VOIDWALKER, SpawnLocation[3], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60000);
|
||||
uiPhase = 0;
|
||||
break;
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@ public:
|
||||
|
||||
void Reset()
|
||||
{
|
||||
uiDarkOffering = urand(290,10);
|
||||
uiDarkOffering = urand(290, 10);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 const uiDiff)
|
||||
@@ -174,14 +174,14 @@ public:
|
||||
|
||||
if (uiDarkOffering <= uiDiff)
|
||||
{
|
||||
if (Creature* pFriend = me->FindNearestCreature(me->GetEntry(),25.0f,true))
|
||||
if (Creature* pFriend = me->FindNearestCreature(me->GetEntry(), 25.0f, true))
|
||||
{
|
||||
if (pFriend)
|
||||
DoCast(pFriend,SPELL_DARK_OFFERING);
|
||||
DoCast(pFriend, SPELL_DARK_OFFERING);
|
||||
}
|
||||
else
|
||||
DoCast(me,SPELL_DARK_OFFERING);
|
||||
uiDarkOffering = urand(4400,12500);
|
||||
DoCast(me, SPELL_DARK_OFFERING);
|
||||
uiDarkOffering = urand(4400, 12500);
|
||||
} else uiDarkOffering -= uiDiff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
|
||||
@@ -110,26 +110,26 @@ public:
|
||||
// RaiseDead_Timer = 30000;
|
||||
SummonSkeletons_Timer = 34000;
|
||||
if (pInstance && pInstance->GetData(TYPE_RAMSTEIN) == DONE)
|
||||
pInstance->SetData(TYPE_BARON,NOT_STARTED);
|
||||
pInstance->SetData(TYPE_BARON, NOT_STARTED);
|
||||
}
|
||||
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
if (pInstance)//can't use entercombat(), boss' dmg aura sets near players in combat, before entering the room's door
|
||||
pInstance->SetData(TYPE_BARON,IN_PROGRESS);
|
||||
pInstance->SetData(TYPE_BARON, IN_PROGRESS);
|
||||
ScriptedAI::AttackStart(who);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summoned)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
summoned->AI()->AttackStart(pTarget);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*Killer*/)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_BARON,DONE);
|
||||
pInstance->SetData(TYPE_BARON, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -171,12 +171,12 @@ public:
|
||||
//SummonSkeletons
|
||||
if (SummonSkeletons_Timer <= diff)
|
||||
{
|
||||
me->SummonCreature(11197,ADD_1X,ADD_1Y,ADD_1Z,ADD_1O,TEMPSUMMON_TIMED_DESPAWN,29000);
|
||||
me->SummonCreature(11197,ADD_2X,ADD_2Y,ADD_2Z,ADD_2O,TEMPSUMMON_TIMED_DESPAWN,29000);
|
||||
me->SummonCreature(11197,ADD_3X,ADD_3Y,ADD_3Z,ADD_3O,TEMPSUMMON_TIMED_DESPAWN,29000);
|
||||
me->SummonCreature(11197,ADD_4X,ADD_4Y,ADD_4Z,ADD_4O,TEMPSUMMON_TIMED_DESPAWN,29000);
|
||||
me->SummonCreature(11197,ADD_5X,ADD_5Y,ADD_5Z,ADD_5O,TEMPSUMMON_TIMED_DESPAWN,29000);
|
||||
me->SummonCreature(11197,ADD_6X,ADD_6Y,ADD_6Z,ADD_6O,TEMPSUMMON_TIMED_DESPAWN,29000);
|
||||
me->SummonCreature(11197, ADD_1X, ADD_1Y, ADD_1Z, ADD_1O, TEMPSUMMON_TIMED_DESPAWN, 29000);
|
||||
me->SummonCreature(11197, ADD_2X, ADD_2Y, ADD_2Z, ADD_2O, TEMPSUMMON_TIMED_DESPAWN, 29000);
|
||||
me->SummonCreature(11197, ADD_3X, ADD_3Y, ADD_3Z, ADD_3O, TEMPSUMMON_TIMED_DESPAWN, 29000);
|
||||
me->SummonCreature(11197, ADD_4X, ADD_4Y, ADD_4Z, ADD_4O, TEMPSUMMON_TIMED_DESPAWN, 29000);
|
||||
me->SummonCreature(11197, ADD_5X, ADD_5Y, ADD_5Z, ADD_5O, TEMPSUMMON_TIMED_DESPAWN, 29000);
|
||||
me->SummonCreature(11197, ADD_6X, ADD_6Y, ADD_6Z, ADD_6O, TEMPSUMMON_TIMED_DESPAWN, 29000);
|
||||
|
||||
//34 seconds until we should cast this again
|
||||
SummonSkeletons_Timer = 40000;
|
||||
|
||||
@@ -70,7 +70,7 @@ public:
|
||||
void JustDied(Unit* /*Killer*/)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_BARONESS,IN_PROGRESS);
|
||||
pInstance->SetData(TYPE_BARONESS, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -112,7 +112,7 @@ public:
|
||||
if (rand()%100 < 65)
|
||||
{
|
||||
Unit *pTarget = NULL;
|
||||
pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
|
||||
pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||
if (pTarget)DoCast(pTarget, SPELL_POSSESS);
|
||||
}
|
||||
//50 seconds until we should cast this again
|
||||
|
||||
@@ -105,13 +105,13 @@ public:
|
||||
|
||||
void JustDied(Unit* /*Victim*/)
|
||||
{
|
||||
me->SummonCreature(11054,ADD_1X,ADD_1Y,ADD_1Z,ADD_1O,TEMPSUMMON_TIMED_DESPAWN,240000);
|
||||
me->SummonCreature(11054,ADD_2X,ADD_2Y,ADD_2Z,ADD_2O,TEMPSUMMON_TIMED_DESPAWN,240000);
|
||||
me->SummonCreature(11054,ADD_3X,ADD_3Y,ADD_3Z,ADD_3O,TEMPSUMMON_TIMED_DESPAWN,240000);
|
||||
me->SummonCreature(11054,ADD_4X,ADD_4Y,ADD_4Z,ADD_4O,TEMPSUMMON_TIMED_DESPAWN,240000);
|
||||
me->SummonCreature(11054,ADD_5X,ADD_5Y,ADD_5Z,ADD_5O,TEMPSUMMON_TIMED_DESPAWN,240000);
|
||||
me->SummonCreature(11054,ADD_7X,ADD_7Y,ADD_7Z,ADD_7O,TEMPSUMMON_TIMED_DESPAWN,240000);
|
||||
me->SummonCreature(11054,ADD_9X,ADD_9Y,ADD_9Z,ADD_9O,TEMPSUMMON_TIMED_DESPAWN,240000);
|
||||
me->SummonCreature(11054, ADD_1X, ADD_1Y, ADD_1Z, ADD_1O, TEMPSUMMON_TIMED_DESPAWN, 240000);
|
||||
me->SummonCreature(11054, ADD_2X, ADD_2Y, ADD_2Z, ADD_2O, TEMPSUMMON_TIMED_DESPAWN, 240000);
|
||||
me->SummonCreature(11054, ADD_3X, ADD_3Y, ADD_3Z, ADD_3O, TEMPSUMMON_TIMED_DESPAWN, 240000);
|
||||
me->SummonCreature(11054, ADD_4X, ADD_4Y, ADD_4Z, ADD_4O, TEMPSUMMON_TIMED_DESPAWN, 240000);
|
||||
me->SummonCreature(11054, ADD_5X, ADD_5Y, ADD_5Z, ADD_5O, TEMPSUMMON_TIMED_DESPAWN, 240000);
|
||||
me->SummonCreature(11054, ADD_7X, ADD_7Y, ADD_7Z, ADD_7O, TEMPSUMMON_TIMED_DESPAWN, 240000);
|
||||
me->SummonCreature(11054, ADD_9X, ADD_9Y, ADD_9Z, ADD_9O, TEMPSUMMON_TIMED_DESPAWN, 240000);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
@@ -164,49 +164,49 @@ public:
|
||||
switch (rand()%9)
|
||||
{
|
||||
case 0:
|
||||
me->SummonCreature(11054,ADD_1X,ADD_1Y,ADD_1Z,ADD_1O,TEMPSUMMON_TIMED_DESPAWN,240000);
|
||||
me->SummonCreature(11054,ADD_2X,ADD_2Y,ADD_2Z,ADD_2O,TEMPSUMMON_TIMED_DESPAWN,240000);
|
||||
me->SummonCreature(11054,ADD_4X,ADD_4Y,ADD_4Z,ADD_4O,TEMPSUMMON_TIMED_DESPAWN,240000);
|
||||
me->SummonCreature(11054, ADD_1X, ADD_1Y, ADD_1Z, ADD_1O, TEMPSUMMON_TIMED_DESPAWN, 240000);
|
||||
me->SummonCreature(11054, ADD_2X, ADD_2Y, ADD_2Z, ADD_2O, TEMPSUMMON_TIMED_DESPAWN, 240000);
|
||||
me->SummonCreature(11054, ADD_4X, ADD_4Y, ADD_4Z, ADD_4O, TEMPSUMMON_TIMED_DESPAWN, 240000);
|
||||
break;
|
||||
case 1:
|
||||
me->SummonCreature(11054,ADD_2X,ADD_2Y,ADD_2Z,ADD_2O,TEMPSUMMON_TIMED_DESPAWN,240000);
|
||||
me->SummonCreature(11054,ADD_3X,ADD_3Y,ADD_3Z,ADD_3O,TEMPSUMMON_TIMED_DESPAWN,240000);
|
||||
me->SummonCreature(11054,ADD_5X,ADD_5Y,ADD_5Z,ADD_5O,TEMPSUMMON_TIMED_DESPAWN,240000);
|
||||
me->SummonCreature(11054, ADD_2X, ADD_2Y, ADD_2Z, ADD_2O, TEMPSUMMON_TIMED_DESPAWN, 240000);
|
||||
me->SummonCreature(11054, ADD_3X, ADD_3Y, ADD_3Z, ADD_3O, TEMPSUMMON_TIMED_DESPAWN, 240000);
|
||||
me->SummonCreature(11054, ADD_5X, ADD_5Y, ADD_5Z, ADD_5O, TEMPSUMMON_TIMED_DESPAWN, 240000);
|
||||
break;
|
||||
case 2:
|
||||
me->SummonCreature(11054,ADD_3X,ADD_3Y,ADD_3Z,ADD_3O,TEMPSUMMON_TIMED_DESPAWN,240000);
|
||||
me->SummonCreature(11054,ADD_4X,ADD_4Y,ADD_4Z,ADD_4O,TEMPSUMMON_TIMED_DESPAWN,240000);
|
||||
me->SummonCreature(11054,ADD_6X,ADD_6Y,ADD_6Z,ADD_6O,TEMPSUMMON_TIMED_DESPAWN,240000);
|
||||
me->SummonCreature(11054, ADD_3X, ADD_3Y, ADD_3Z, ADD_3O, TEMPSUMMON_TIMED_DESPAWN, 240000);
|
||||
me->SummonCreature(11054, ADD_4X, ADD_4Y, ADD_4Z, ADD_4O, TEMPSUMMON_TIMED_DESPAWN, 240000);
|
||||
me->SummonCreature(11054, ADD_6X, ADD_6Y, ADD_6Z, ADD_6O, TEMPSUMMON_TIMED_DESPAWN, 240000);
|
||||
break;
|
||||
case 3:
|
||||
me->SummonCreature(11054,ADD_4X,ADD_4Y,ADD_4Z,ADD_4O,TEMPSUMMON_TIMED_DESPAWN,240000);
|
||||
me->SummonCreature(11054,ADD_5X,ADD_5Y,ADD_5Z,ADD_5O,TEMPSUMMON_TIMED_DESPAWN,240000);
|
||||
me->SummonCreature(11054,ADD_7X,ADD_7Y,ADD_7Z,ADD_7O,TEMPSUMMON_TIMED_DESPAWN,240000);
|
||||
me->SummonCreature(11054, ADD_4X, ADD_4Y, ADD_4Z, ADD_4O, TEMPSUMMON_TIMED_DESPAWN, 240000);
|
||||
me->SummonCreature(11054, ADD_5X, ADD_5Y, ADD_5Z, ADD_5O, TEMPSUMMON_TIMED_DESPAWN, 240000);
|
||||
me->SummonCreature(11054, ADD_7X, ADD_7Y, ADD_7Z, ADD_7O, TEMPSUMMON_TIMED_DESPAWN, 240000);
|
||||
break;
|
||||
case 4:
|
||||
me->SummonCreature(11054,ADD_5X,ADD_5Y,ADD_5Z,ADD_5O,TEMPSUMMON_TIMED_DESPAWN,240000);
|
||||
me->SummonCreature(11054,ADD_6X,ADD_6Y,ADD_6Z,ADD_6O,TEMPSUMMON_TIMED_DESPAWN,240000);
|
||||
me->SummonCreature(11054,ADD_8X,ADD_8Y,ADD_8Z,ADD_8O,TEMPSUMMON_TIMED_DESPAWN,240000);
|
||||
me->SummonCreature(11054, ADD_5X, ADD_5Y, ADD_5Z, ADD_5O, TEMPSUMMON_TIMED_DESPAWN, 240000);
|
||||
me->SummonCreature(11054, ADD_6X, ADD_6Y, ADD_6Z, ADD_6O, TEMPSUMMON_TIMED_DESPAWN, 240000);
|
||||
me->SummonCreature(11054, ADD_8X, ADD_8Y, ADD_8Z, ADD_8O, TEMPSUMMON_TIMED_DESPAWN, 240000);
|
||||
break;
|
||||
case 5:
|
||||
me->SummonCreature(11054,ADD_6X,ADD_6Y,ADD_6Z,ADD_6O,TEMPSUMMON_TIMED_DESPAWN,240000);
|
||||
me->SummonCreature(11054,ADD_7X,ADD_7Y,ADD_7Z,ADD_7O,TEMPSUMMON_TIMED_DESPAWN,240000);
|
||||
me->SummonCreature(11054,ADD_9X,ADD_9Y,ADD_9Z,ADD_9O,TEMPSUMMON_TIMED_DESPAWN,240000);
|
||||
me->SummonCreature(11054, ADD_6X, ADD_6Y, ADD_6Z, ADD_6O, TEMPSUMMON_TIMED_DESPAWN, 240000);
|
||||
me->SummonCreature(11054, ADD_7X, ADD_7Y, ADD_7Z, ADD_7O, TEMPSUMMON_TIMED_DESPAWN, 240000);
|
||||
me->SummonCreature(11054, ADD_9X, ADD_9Y, ADD_9Z, ADD_9O, TEMPSUMMON_TIMED_DESPAWN, 240000);
|
||||
break;
|
||||
case 6:
|
||||
me->SummonCreature(11054,ADD_7X,ADD_7Y,ADD_7Z,ADD_7O,TEMPSUMMON_TIMED_DESPAWN,240000);
|
||||
me->SummonCreature(11054,ADD_8X,ADD_8Y,ADD_8Z,ADD_8O,TEMPSUMMON_TIMED_DESPAWN,240000);
|
||||
me->SummonCreature(11054,ADD_1X,ADD_1Y,ADD_1Z,ADD_1O,TEMPSUMMON_TIMED_DESPAWN,240000);
|
||||
me->SummonCreature(11054, ADD_7X, ADD_7Y, ADD_7Z, ADD_7O, TEMPSUMMON_TIMED_DESPAWN, 240000);
|
||||
me->SummonCreature(11054, ADD_8X, ADD_8Y, ADD_8Z, ADD_8O, TEMPSUMMON_TIMED_DESPAWN, 240000);
|
||||
me->SummonCreature(11054, ADD_1X, ADD_1Y, ADD_1Z, ADD_1O, TEMPSUMMON_TIMED_DESPAWN, 240000);
|
||||
break;
|
||||
case 7:
|
||||
me->SummonCreature(11054,ADD_8X,ADD_8Y,ADD_8Z,ADD_8O,TEMPSUMMON_TIMED_DESPAWN,240000);
|
||||
me->SummonCreature(11054,ADD_9X,ADD_9Y,ADD_9Z,ADD_9O,TEMPSUMMON_TIMED_DESPAWN,240000);
|
||||
me->SummonCreature(11054,ADD_2X,ADD_2Y,ADD_2Z,ADD_2O,TEMPSUMMON_TIMED_DESPAWN,240000);
|
||||
me->SummonCreature(11054, ADD_8X, ADD_8Y, ADD_8Z, ADD_8O, TEMPSUMMON_TIMED_DESPAWN, 240000);
|
||||
me->SummonCreature(11054, ADD_9X, ADD_9Y, ADD_9Z, ADD_9O, TEMPSUMMON_TIMED_DESPAWN, 240000);
|
||||
me->SummonCreature(11054, ADD_2X, ADD_2Y, ADD_2Z, ADD_2O, TEMPSUMMON_TIMED_DESPAWN, 240000);
|
||||
break;
|
||||
case 8:
|
||||
me->SummonCreature(11054,ADD_9X,ADD_9Y,ADD_9Z,ADD_9O,TEMPSUMMON_TIMED_DESPAWN,240000);
|
||||
me->SummonCreature(11054,ADD_1X,ADD_1Y,ADD_1Z,ADD_1O,TEMPSUMMON_TIMED_DESPAWN,240000);
|
||||
me->SummonCreature(11054,ADD_3X,ADD_3Y,ADD_3Z,ADD_3O,TEMPSUMMON_TIMED_DESPAWN,240000);
|
||||
me->SummonCreature(11054, ADD_9X, ADD_9Y, ADD_9Z, ADD_9O, TEMPSUMMON_TIMED_DESPAWN, 240000);
|
||||
me->SummonCreature(11054, ADD_1X, ADD_1Y, ADD_1Z, ADD_1O, TEMPSUMMON_TIMED_DESPAWN, 240000);
|
||||
me->SummonCreature(11054, ADD_3X, ADD_3Y, ADD_3Z, ADD_3O, TEMPSUMMON_TIMED_DESPAWN, 240000);
|
||||
break;
|
||||
}
|
||||
//30 seconds until we should cast this again
|
||||
|
||||
@@ -186,7 +186,7 @@ public:
|
||||
//PsychicScream
|
||||
if (m_uiPsychicScream_Timer <= uiDiff)
|
||||
{
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_PSYCHICSCREAM);
|
||||
|
||||
m_uiPsychicScream_Timer = 20000;
|
||||
@@ -195,7 +195,7 @@ public:
|
||||
//DeepSleep
|
||||
if (m_uiDeepSleep_Timer <= uiDiff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_SLEEP);
|
||||
|
||||
m_uiDeepSleep_Timer = 15000;
|
||||
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
void JustDied(Unit* /*Killer*/)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_PALLID,IN_PROGRESS);
|
||||
pInstance->SetData(TYPE_PALLID, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
|
||||
@@ -70,12 +70,12 @@ public:
|
||||
void JustDied(Unit* /*Killer*/)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_NERUB,IN_PROGRESS);
|
||||
pInstance->SetData(TYPE_NERUB, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void RaiseUndeadScarab(Unit* pVictim)
|
||||
{
|
||||
if (Creature* pUndeadScarab = DoSpawnCreature(10876, float(irand(-9,9)), float(irand(-9,9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180000))
|
||||
if (Creature* pUndeadScarab = DoSpawnCreature(10876, float(irand(-9, 9)), float(irand(-9, 9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180000))
|
||||
if (pUndeadScarab->AI())
|
||||
pUndeadScarab->AI()->AttackStart(pVictim);
|
||||
}
|
||||
@@ -95,7 +95,7 @@ public:
|
||||
//PierceArmor
|
||||
if (PierceArmor_Timer <= diff)
|
||||
{
|
||||
if (urand(0,3) < 2)
|
||||
if (urand(0, 3) < 2)
|
||||
DoCast(me->getVictim(), SPELL_PIERCEARMOR);
|
||||
PierceArmor_Timer = 35000;
|
||||
} else PierceArmor_Timer -= diff;
|
||||
|
||||
@@ -67,7 +67,7 @@ public:
|
||||
{
|
||||
for (uint8 i = 0; i < 30; ++i)
|
||||
{
|
||||
if (Creature* mob = me->SummonCreature(C_MINDLESS_UNDEAD,3969.35f+irand(-10,10),-3391.87f+irand(-10,10),119.11f,5.91f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,1800000))
|
||||
if (Creature* mob = me->SummonCreature(C_MINDLESS_UNDEAD, 3969.35f+irand(-10, 10), -3391.87f+irand(-10, 10), 119.11f, 5.91f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 1800000))
|
||||
mob->AI()->AttackStart(me->SelectNearestTarget(100.0f));
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ public:
|
||||
{
|
||||
if (!HasYelled)
|
||||
{
|
||||
me->MonsterYell(SAY_SPAWN,LANG_UNIVERSAL,0);
|
||||
me->MonsterYell(SAY_SPAWN, LANG_UNIVERSAL, 0);
|
||||
HasYelled = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ class instance_stratholme : public InstanceMapScript
|
||||
break;
|
||||
case GO_GAUNTLET_GATE1:
|
||||
//weird, but unless flag is set, client will not respond as expected. DB bug?
|
||||
go->SetFlag(GAMEOBJECT_FLAGS,GO_FLAG_LOCKED);
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
|
||||
gauntletGate1GUID = go->GetGUID();
|
||||
break;
|
||||
case GO_ZIGGURAT1:
|
||||
@@ -295,13 +295,13 @@ class instance_stratholme : public InstanceMapScript
|
||||
if (!count)
|
||||
{
|
||||
//a bit itchy, it should close the door after 10 secs, but it doesn't. skipping it for now.
|
||||
//UpdateGoState(ziggurat4GUID,0,true);
|
||||
//UpdateGoState(ziggurat4GUID, 0, true);
|
||||
if (Creature* pBaron = instance->GetCreature(baronGUID))
|
||||
pBaron->SummonCreature(C_RAMSTEIN, 4032.84f, -3390.24f, 119.73f, 4.71f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 1800000);
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Instance Stratholme: Ramstein spawned.");
|
||||
}
|
||||
else
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Instance Stratholme: %u Abomnation left to kill.",count);
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Instance Stratholme: %u Abomnation left to kill.", count);
|
||||
}
|
||||
|
||||
if (data == NOT_STARTED)
|
||||
@@ -329,7 +329,7 @@ class instance_stratholme : public InstanceMapScript
|
||||
if (player->GetQuestStatus(QUEST_DEAD_MAN_PLEA) == QUEST_STATUS_INCOMPLETE)
|
||||
player->AreaExploredOrEventHappens(QUEST_DEAD_MAN_PLEA);
|
||||
|
||||
SetData(TYPE_BARON_RUN,DONE);
|
||||
SetData(TYPE_BARON_RUN, DONE);
|
||||
}
|
||||
}
|
||||
if (data == DONE || data == NOT_STARTED)
|
||||
|
||||
@@ -64,14 +64,14 @@ public:
|
||||
if (pGroupie->GetQuestStatus(QUEST_DEAD_MAN_PLEA) == QUEST_STATUS_INCOMPLETE &&
|
||||
!pGroupie->HasAura(SPELL_BARON_ULTIMATUM) &&
|
||||
pGroupie->GetMap() == pGo->GetMap())
|
||||
pGroupie->CastSpell(pGroupie,SPELL_BARON_ULTIMATUM,true);
|
||||
pGroupie->CastSpell(pGroupie, SPELL_BARON_ULTIMATUM, true);
|
||||
}
|
||||
} else if (pPlayer->GetQuestStatus(QUEST_DEAD_MAN_PLEA) == QUEST_STATUS_INCOMPLETE &&
|
||||
!pPlayer->HasAura(SPELL_BARON_ULTIMATUM) &&
|
||||
pPlayer->GetMap() == pGo->GetMap())
|
||||
pPlayer->CastSpell(pPlayer,SPELL_BARON_ULTIMATUM,true);
|
||||
pPlayer->CastSpell(pPlayer, SPELL_BARON_ULTIMATUM, true);
|
||||
|
||||
pInstance->SetData(TYPE_BARON_RUN,IN_PROGRESS);
|
||||
pInstance->SetData(TYPE_BARON_RUN, IN_PROGRESS);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ public:
|
||||
|
||||
void Reset()
|
||||
{
|
||||
DoScriptText(RAND(SAY_ZAPPED0,SAY_ZAPPED1,SAY_ZAPPED2,SAY_ZAPPED3), me);
|
||||
DoScriptText(RAND(SAY_ZAPPED0, SAY_ZAPPED1, SAY_ZAPPED2, SAY_ZAPPED3), me);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) {}
|
||||
@@ -162,7 +162,7 @@ public:
|
||||
|
||||
void JustSummoned(Creature *summoned)
|
||||
{
|
||||
summoned->CastSpell(summoned,SPELL_SOUL_FREED,false);
|
||||
summoned->CastSpell(summoned, SPELL_SOUL_FREED, false);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*Killer*/)
|
||||
@@ -177,7 +177,7 @@ public:
|
||||
{
|
||||
if (Die_Timer <= diff)
|
||||
{
|
||||
if (Unit* pTemp = Unit::GetUnit(*me,Tagger))
|
||||
if (Unit* pTemp = Unit::GetUnit(*me, Tagger))
|
||||
{
|
||||
CAST_PLR(pTemp)->KilledMonsterCredit(ENTRY_RESTLESS, me->GetGUID());
|
||||
me->Kill(me);
|
||||
@@ -237,7 +237,7 @@ public:
|
||||
for (uint32 i = 1; i <= 4; ++i)
|
||||
{
|
||||
//100%, 50%, 33%, 25% chance to spawn
|
||||
if (urand(1,i) == 1)
|
||||
if (urand(1, i) == 1)
|
||||
DoSummon(ENTRY_RESTLESS, me, 20.0f, 600000);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -169,20 +169,20 @@ public:
|
||||
|
||||
void UseStatue(GameObject* go)
|
||||
{
|
||||
go->SummonGameObject(GO_ATALAI_LIGHT1,go->GetPositionX(),go->GetPositionY(),go->GetPositionZ(),0,0,0,0,0,0);
|
||||
go->SummonGameObject(GO_ATALAI_LIGHT1, go->GetPositionX(), go->GetPositionY(), go->GetPositionZ(), 0, 0, 0, 0, 0, 0);
|
||||
go->SetUInt32Value(GAMEOBJECT_FLAGS, 4);
|
||||
}
|
||||
|
||||
/*
|
||||
void UseLastStatue(GameObject* go)
|
||||
{
|
||||
AtalaiStatue1->SummonGameObject(GO_ATALAI_LIGHT2,AtalaiStatue1->GetPositionX(),AtalaiStatue1->GetPositionY(),AtalaiStatue1->GetPositionZ(),0,0,0,0,0,100000);
|
||||
AtalaiStatue2->SummonGameObject(GO_ATALAI_LIGHT2,AtalaiStatue2->GetPositionX(),AtalaiStatue2->GetPositionY(),AtalaiStatue2->GetPositionZ(),0,0,0,0,0,100000);
|
||||
AtalaiStatue3->SummonGameObject(GO_ATALAI_LIGHT2,AtalaiStatue3->GetPositionX(),AtalaiStatue3->GetPositionY(),AtalaiStatue3->GetPositionZ(),0,0,0,0,0,100000);
|
||||
AtalaiStatue4->SummonGameObject(GO_ATALAI_LIGHT2,AtalaiStatue4->GetPositionX(),AtalaiStatue4->GetPositionY(),AtalaiStatue4->GetPositionZ(),0,0,0,0,0,100000);
|
||||
AtalaiStatue5->SummonGameObject(GO_ATALAI_LIGHT2,AtalaiStatue5->GetPositionX(),AtalaiStatue5->GetPositionY(),AtalaiStatue5->GetPositionZ(),0,0,0,0,0,100000);
|
||||
AtalaiStatue6->SummonGameObject(GO_ATALAI_LIGHT2,AtalaiStatue6->GetPositionX(),AtalaiStatue6->GetPositionY(),AtalaiStatue6->GetPositionZ(),0,0,0,0,0,100000);
|
||||
go->SummonGameObject(148838,-488.997,96.61,-189.019,-1.52,0,0,0,0,100000);
|
||||
AtalaiStatue1->SummonGameObject(GO_ATALAI_LIGHT2, AtalaiStatue1->GetPositionX(), AtalaiStatue1->GetPositionY(), AtalaiStatue1->GetPositionZ(), 0, 0, 0, 0, 0, 100000);
|
||||
AtalaiStatue2->SummonGameObject(GO_ATALAI_LIGHT2, AtalaiStatue2->GetPositionX(), AtalaiStatue2->GetPositionY(), AtalaiStatue2->GetPositionZ(), 0, 0, 0, 0, 0, 100000);
|
||||
AtalaiStatue3->SummonGameObject(GO_ATALAI_LIGHT2, AtalaiStatue3->GetPositionX(), AtalaiStatue3->GetPositionY(), AtalaiStatue3->GetPositionZ(), 0, 0, 0, 0, 0, 100000);
|
||||
AtalaiStatue4->SummonGameObject(GO_ATALAI_LIGHT2, AtalaiStatue4->GetPositionX(), AtalaiStatue4->GetPositionY(), AtalaiStatue4->GetPositionZ(), 0, 0, 0, 0, 0, 100000);
|
||||
AtalaiStatue5->SummonGameObject(GO_ATALAI_LIGHT2, AtalaiStatue5->GetPositionX(), AtalaiStatue5->GetPositionY(), AtalaiStatue5->GetPositionZ(), 0, 0, 0, 0, 0, 100000);
|
||||
AtalaiStatue6->SummonGameObject(GO_ATALAI_LIGHT2, AtalaiStatue6->GetPositionX(), AtalaiStatue6->GetPositionY(), AtalaiStatue6->GetPositionZ(), 0, 0, 0, 0, 0, 100000);
|
||||
go->SummonGameObject(148838, -488.997, 96.61, -189.019, -1.52, 0, 0, 0, 0, 100000);
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* pGo)
|
||||
{
|
||||
if (InstanceScript* pInstance = pPlayer->GetInstanceScript())
|
||||
pInstance->SetData(EVENT_STATE,pGo->GetEntry());
|
||||
pInstance->SetData(EVENT_STATE, pGo->GetEntry());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit* /*victim*/)
|
||||
{
|
||||
DoScriptText(RAND(YELL_KILL1,YELL_KILL2,YELL_KILL3), me);
|
||||
DoScriptText(RAND(YELL_KILL1, YELL_KILL2, YELL_KILL3), me);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*Killer*/)
|
||||
@@ -139,9 +139,9 @@ public:
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(DATA_BRUTALLUS_EVENT, DONE);
|
||||
float x,y,z;
|
||||
me->GetPosition(x,y,z);
|
||||
me->SummonCreature(FELMYST, x,y, z+30, me->GetOrientation(), TEMPSUMMON_MANUAL_DESPAWN, 0);
|
||||
float x, y, z;
|
||||
me->GetPosition(x, y, z);
|
||||
me->SummonCreature(FELMYST, x, y, z+30, me->GetOrientation(), TEMPSUMMON_MANUAL_DESPAWN, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -316,7 +316,7 @@ public:
|
||||
|
||||
if (StompTimer <= diff)
|
||||
{
|
||||
DoScriptText(RAND(YELL_LOVE1,YELL_LOVE2,YELL_LOVE3), me);
|
||||
DoScriptText(RAND(YELL_LOVE1, YELL_LOVE2, YELL_LOVE3), me);
|
||||
DoCast(me->getVictim(), SPELL_STOMP);
|
||||
StompTimer = 30000;
|
||||
} else StompTimer -= diff;
|
||||
@@ -331,7 +331,7 @@ public:
|
||||
(*i)->CastSpell((*i), SPELL_BURN, true);
|
||||
break;
|
||||
}
|
||||
BurnTimer = urand(60000,180000);
|
||||
BurnTimer = urand(60000, 180000);
|
||||
} else BurnTimer -= diff;
|
||||
|
||||
if (BerserkTimer < diff && !Enraged)
|
||||
|
||||
@@ -120,13 +120,13 @@ public:
|
||||
|
||||
if (pInstance)
|
||||
{
|
||||
Unit* Temp = Unit::GetUnit((*me),pInstance->GetData64(DATA_ALYTHESS));
|
||||
Unit* Temp = Unit::GetUnit((*me), pInstance->GetData64(DATA_ALYTHESS));
|
||||
if (Temp)
|
||||
{
|
||||
if (Temp->isDead())
|
||||
CAST_CRE(Temp)->Respawn();
|
||||
else if (Temp->getVictim())
|
||||
me->getThreatManager().addThreat(Temp->getVictim(),0.0f);
|
||||
me->getThreatManager().addThreat(Temp->getVictim(), 0.0f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ public:
|
||||
|
||||
if (pInstance)
|
||||
{
|
||||
Unit* Temp = Unit::GetUnit((*me),pInstance->GetData64(DATA_ALYTHESS));
|
||||
Unit* Temp = Unit::GetUnit((*me), pInstance->GetData64(DATA_ALYTHESS));
|
||||
if (Temp && Temp->isAlive() && !(Temp->getVictim()))
|
||||
CAST_CRE(Temp)->AI()->AttackStart(who);
|
||||
}
|
||||
@@ -164,7 +164,7 @@ public:
|
||||
void KilledUnit(Unit * /*victim*/)
|
||||
{
|
||||
if (rand()%4 == 0)
|
||||
DoScriptText(RAND(YELL_SAC_KILL_1,YELL_SAC_KILL_2), me);
|
||||
DoScriptText(RAND(YELL_SAC_KILL_1, YELL_SAC_KILL_2), me);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*Killer*/)
|
||||
@@ -181,7 +181,7 @@ public:
|
||||
me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit *pTarget,const SpellEntry* spell)
|
||||
void SpellHitTarget(Unit *pTarget, const SpellEntry* spell)
|
||||
{
|
||||
switch(spell->Id)
|
||||
{
|
||||
@@ -231,7 +231,7 @@ public:
|
||||
if (pInstance)
|
||||
{
|
||||
Unit* Temp = NULL;
|
||||
Temp = Unit::GetUnit((*me),pInstance->GetData64(DATA_ALYTHESS));
|
||||
Temp = Unit::GetUnit((*me), pInstance->GetData64(DATA_ALYTHESS));
|
||||
if (Temp && Temp->isDead())
|
||||
{
|
||||
DoScriptText(YELL_SISTER_ALYTHESS_DEAD, me);
|
||||
@@ -301,10 +301,10 @@ public:
|
||||
for (uint8 i = 0; i<3; ++i)
|
||||
{
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
temp = DoSpawnCreature(MOB_SHADOW_IMAGE,0,0,0,0,TEMPSUMMON_CORPSE_DESPAWN,10000);
|
||||
temp = DoSpawnCreature(MOB_SHADOW_IMAGE, 0, 0, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 10000);
|
||||
if (temp && pTarget)
|
||||
{
|
||||
temp->AddThreat(pTarget,1000000);//don't change target(healers)
|
||||
temp->AddThreat(pTarget, 1000000);//don't change target(healers)
|
||||
temp->AI()->AttackStart(pTarget);
|
||||
}
|
||||
}
|
||||
@@ -382,13 +382,13 @@ public:
|
||||
|
||||
if (pInstance)
|
||||
{
|
||||
Unit* Temp = Unit::GetUnit((*me),pInstance->GetData64(DATA_SACROLASH));
|
||||
Unit* Temp = Unit::GetUnit((*me), pInstance->GetData64(DATA_SACROLASH));
|
||||
if (Temp)
|
||||
{
|
||||
if (Temp->isDead())
|
||||
CAST_CRE(Temp)->Respawn();
|
||||
else if (Temp->getVictim())
|
||||
me->getThreatManager().addThreat(Temp->getVictim(),0.0f);
|
||||
me->getThreatManager().addThreat(Temp->getVictim(), 0.0f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -415,7 +415,7 @@ public:
|
||||
|
||||
if (pInstance)
|
||||
{
|
||||
Unit* Temp = Unit::GetUnit((*me),pInstance->GetData64(DATA_SACROLASH));
|
||||
Unit* Temp = Unit::GetUnit((*me), pInstance->GetData64(DATA_SACROLASH));
|
||||
if (Temp && Temp->isAlive() && !(Temp->getVictim()))
|
||||
CAST_CRE(Temp)->AI()->AttackStart(who);
|
||||
}
|
||||
@@ -459,7 +459,7 @@ public:
|
||||
{
|
||||
if (rand()%4 == 0)
|
||||
{
|
||||
DoScriptText(RAND(YELL_ALY_KILL_1,YELL_ALY_KILL_2), me);
|
||||
DoScriptText(RAND(YELL_ALY_KILL_1, YELL_ALY_KILL_2), me);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -476,7 +476,7 @@ public:
|
||||
me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit *pTarget,const SpellEntry* spell)
|
||||
void SpellHitTarget(Unit *pTarget, const SpellEntry* spell)
|
||||
{
|
||||
switch(spell->Id)
|
||||
{
|
||||
@@ -568,7 +568,7 @@ public:
|
||||
if (pInstance)
|
||||
{
|
||||
Unit* Temp = NULL;
|
||||
Temp = Unit::GetUnit((*me),pInstance->GetData64(DATA_SACROLASH));
|
||||
Temp = Unit::GetUnit((*me), pInstance->GetData64(DATA_SACROLASH));
|
||||
if (Temp && Temp->isDead())
|
||||
{
|
||||
DoScriptText(YELL_SISTER_SACROLASH_DEAD, me);
|
||||
@@ -582,12 +582,12 @@ public:
|
||||
{
|
||||
if (pInstance)
|
||||
{
|
||||
Creature* sisiter = Unit::GetCreature((*me),pInstance->GetData64(DATA_SACROLASH));
|
||||
Creature* sisiter = Unit::GetCreature((*me), pInstance->GetData64(DATA_SACROLASH));
|
||||
if (sisiter && !sisiter->isDead() && sisiter->getVictim())
|
||||
{
|
||||
me->AddThreat(sisiter->getVictim(),0.0f);
|
||||
me->AddThreat(sisiter->getVictim(), 0.0f);
|
||||
DoStartNoMovement(sisiter->getVictim());
|
||||
me->Attack(sisiter->getVictim(),false);
|
||||
me->Attack(sisiter->getVictim(), false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -701,7 +701,7 @@ public:
|
||||
|
||||
void EnterCombat(Unit * /*who*/){}
|
||||
|
||||
void SpellHitTarget(Unit *pTarget,const SpellEntry* spell)
|
||||
void SpellHitTarget(Unit *pTarget, const SpellEntry* spell)
|
||||
{
|
||||
switch(spell->Id)
|
||||
{
|
||||
@@ -714,7 +714,7 @@ public:
|
||||
{
|
||||
pTarget->RemoveAurasDueToSpell(SPELL_FLAME_TOUCHED);
|
||||
pTarget->CastSpell(pTarget, SPELL_DARK_FLAME, true);
|
||||
} else pTarget->CastSpell(pTarget,SPELL_DARK_TOUCHED,true);
|
||||
} else pTarget->CastSpell(pTarget, SPELL_DARK_TOUCHED, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit* /*victim*/)
|
||||
{
|
||||
DoScriptText(RAND(YELL_KILL1,YELL_KILL2), me);
|
||||
DoScriptText(RAND(YELL_KILL1, YELL_KILL2), me);
|
||||
}
|
||||
|
||||
void JustRespawned()
|
||||
@@ -436,20 +436,20 @@ public:
|
||||
break;
|
||||
case EVENT_CLEAVE:
|
||||
DoCast(me->getVictim(), SPELL_CLEAVE, false);
|
||||
events.ScheduleEvent(EVENT_CLEAVE, urand(5000,10000));
|
||||
events.ScheduleEvent(EVENT_CLEAVE, urand(5000, 10000));
|
||||
break;
|
||||
case EVENT_CORROSION:
|
||||
DoCast(me->getVictim(), SPELL_CORROSION, false);
|
||||
events.ScheduleEvent(EVENT_CORROSION, urand(20000,30000));
|
||||
events.ScheduleEvent(EVENT_CORROSION, urand(20000, 30000));
|
||||
break;
|
||||
case EVENT_GAS_NOVA:
|
||||
DoCast(me, SPELL_GAS_NOVA, false);
|
||||
events.ScheduleEvent(EVENT_GAS_NOVA, urand(20000,25000));
|
||||
events.ScheduleEvent(EVENT_GAS_NOVA, urand(20000, 25000));
|
||||
break;
|
||||
case EVENT_ENCAPSULATE:
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true))
|
||||
DoCast(pTarget, SPELL_ENCAPSULATE_CHANNEL, false);
|
||||
events.ScheduleEvent(EVENT_ENCAPSULATE, urand(25000,30000));
|
||||
events.ScheduleEvent(EVENT_ENCAPSULATE, urand(25000, 30000));
|
||||
break;
|
||||
case EVENT_FLIGHT:
|
||||
EnterPhase(PHASE_FLIGHT);
|
||||
|
||||
@@ -171,7 +171,7 @@ public:
|
||||
FrostBreathTimer = 15000;
|
||||
WildMagicTimer = 10000;
|
||||
TailLashTimer = 25000;
|
||||
SpectralBlastTimer = urand(20000,25000);
|
||||
SpectralBlastTimer = urand(20000, 25000);
|
||||
CheckTimer = 1000;
|
||||
ResetTimer = 30000;
|
||||
|
||||
@@ -320,7 +320,7 @@ public:
|
||||
advance(i, rand()%targetList.size());
|
||||
if ((*i))
|
||||
{
|
||||
(*i)->CastSpell((*i), SPELL_SPECTRAL_BLAST,true);
|
||||
(*i)->CastSpell((*i), SPELL_SPECTRAL_BLAST, true);
|
||||
SpectralBlastTimer = 20000+rand()%5000;
|
||||
} else SpectralBlastTimer = 1000;
|
||||
} else SpectralBlastTimer -= diff;
|
||||
@@ -360,10 +360,10 @@ public:
|
||||
|
||||
void KilledUnit(Unit * /*victim*/)
|
||||
{
|
||||
DoScriptText(RAND(SAY_EVIL_SLAY1,SAY_EVIL_SLAY2), me);
|
||||
DoScriptText(RAND(SAY_EVIL_SLAY1, SAY_EVIL_SLAY2), me);
|
||||
}
|
||||
|
||||
void MovementInform(uint32 type,uint32 /*id*/)
|
||||
void MovementInform(uint32 type, uint32 /*id*/)
|
||||
{
|
||||
if (type != POINT_MOTION_TYPE)
|
||||
return;
|
||||
@@ -404,7 +404,7 @@ public:
|
||||
break;
|
||||
case 3:
|
||||
me->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
|
||||
me->GetMotionMaster()->MovePoint(0,FLY_X,FLY_Y,FLY_Z);
|
||||
me->GetMotionMaster()->MovePoint(0, FLY_X, FLY_Y, FLY_Z);
|
||||
TalkTimer = 600000;
|
||||
break;
|
||||
default:
|
||||
@@ -422,7 +422,7 @@ public:
|
||||
break;
|
||||
case 2:
|
||||
me->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
|
||||
me->GetMotionMaster()->MovePoint(0,FLY_X,FLY_Y,FLY_Z);
|
||||
me->GetMotionMaster()->MovePoint(0, FLY_X, FLY_Y, FLY_Z);
|
||||
TalkTimer = 15000;
|
||||
break;
|
||||
case 3:
|
||||
@@ -658,7 +658,7 @@ public:
|
||||
EnterEvadeMode();
|
||||
return;
|
||||
}
|
||||
DoScriptText(RAND(SAY_SATH_SLAY1,SAY_SATH_SLAY2), me);
|
||||
DoScriptText(RAND(SAY_SATH_SLAY1, SAY_SATH_SLAY2), me);
|
||||
}
|
||||
|
||||
void JustDied(Unit * /*killer*/)
|
||||
@@ -686,7 +686,7 @@ public:
|
||||
if (i->getSource()->GetPositionZ() <= DRAGON_REALM_Z-5)
|
||||
{
|
||||
i->getSource()->RemoveAura(AURA_SPECTRAL_REALM);
|
||||
i->getSource()->TeleportTo(me->GetMap()->GetId(),i->getSource()->GetPositionX(),i->getSource()->GetPositionY(),DRAGON_REALM_Z+5,i->getSource()->GetOrientation());
|
||||
i->getSource()->TeleportTo(me->GetMap()->GetId(), i->getSource()->GetPositionX(), i->getSource()->GetPositionY(), DRAGON_REALM_Z+5, i->getSource()->GetOrientation());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -767,7 +767,7 @@ public:
|
||||
{
|
||||
if (pUnit->GetPositionZ() > me->GetPositionZ()+5)
|
||||
{
|
||||
me->getThreatManager().modifyThreatPercent(pUnit,-100);
|
||||
me->getThreatManager().modifyThreatPercent(pUnit, -100);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -324,7 +324,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
if (GameObject* pOrb = GetOrb(urand(0,3)))
|
||||
if (GameObject* pOrb = GetOrb(urand(0, 3)))
|
||||
{
|
||||
pOrb->CastSpell(me, SPELL_RING_OF_BLUE_FLAMES);
|
||||
pOrb->SetUInt32Value(GAMEOBJECT_FACTION, 35);
|
||||
@@ -468,7 +468,7 @@ public:
|
||||
if (uiRandomSayTimer < diff)
|
||||
{
|
||||
if (pInstance && pInstance->GetData(DATA_MURU_EVENT) != DONE && pInstance->GetData(DATA_KILJAEDEN_EVENT) == NOT_STARTED)
|
||||
DoScriptText(RAND(SAY_KJ_OFFCOMBAT1,SAY_KJ_OFFCOMBAT2,SAY_KJ_OFFCOMBAT3,SAY_KJ_OFFCOMBAT4,SAY_KJ_OFFCOMBAT5), me);
|
||||
DoScriptText(RAND(SAY_KJ_OFFCOMBAT1, SAY_KJ_OFFCOMBAT2, SAY_KJ_OFFCOMBAT3, SAY_KJ_OFFCOMBAT4, SAY_KJ_OFFCOMBAT5), me);
|
||||
uiRandomSayTimer = 30000;
|
||||
} else uiRandomSayTimer -= diff;
|
||||
|
||||
@@ -486,7 +486,7 @@ public:
|
||||
{
|
||||
me->RemoveAurasDueToSpell(SPELL_ANVEENA_ENERGY_DRAIN);
|
||||
phase = PHASE_NORMAL;
|
||||
DoSpawnCreature(CREATURE_KILJAEDEN, 0, 0,0, 0, TEMPSUMMON_MANUAL_DESPAWN, 0);
|
||||
DoSpawnCreature(CREATURE_KILJAEDEN, 0, 0, 0, 0, TEMPSUMMON_MANUAL_DESPAWN, 0);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -622,7 +622,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit* /*victim*/)
|
||||
{
|
||||
DoScriptText(RAND(SAY_KJ_SLAY1,SAY_KJ_SLAY2), me);
|
||||
DoScriptText(RAND(SAY_KJ_SLAY1, SAY_KJ_SLAY2), me);
|
||||
}
|
||||
|
||||
void EnterEvadeMode()
|
||||
@@ -651,26 +651,26 @@ public:
|
||||
TimerIsDeactivated[TIMER_SHADOW_SPIKE] = false;
|
||||
Timer[TIMER_SHADOW_SPIKE] = 100;
|
||||
// empowered orbs before darkness
|
||||
Timer[TIMER_DARKNESS] = (Phase == PHASE_SACRIFICE) ? 15000 : urand(10000,40000);
|
||||
Timer[TIMER_DARKNESS] = (Phase == PHASE_SACRIFICE) ? 15000 : urand(10000, 40000);
|
||||
Timer[TIMER_ORBS_EMPOWER] = (Phase == PHASE_SACRIFICE) ? 10000 : 5000;
|
||||
}
|
||||
|
||||
void CastSinisterReflection()
|
||||
{
|
||||
DoScriptText(RAND(SAY_KJ_REFLECTION1,SAY_KJ_REFLECTION2), me);
|
||||
DoScriptText(RAND(SAY_KJ_REFLECTION1, SAY_KJ_REFLECTION2), me);
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
{
|
||||
float x,y,z;
|
||||
float x, y, z;
|
||||
Unit *pTarget = NULL;
|
||||
for (uint8 z = 0; z < 6; ++z)
|
||||
{
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
|
||||
if (!pTarget || !pTarget->HasAura(SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT,0))break;
|
||||
if (!pTarget || !pTarget->HasAura(SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT, 0))break;
|
||||
}
|
||||
if (pTarget)
|
||||
{
|
||||
pTarget->GetPosition(x,y,z);
|
||||
if (Creature* pSinisterReflection = me->SummonCreature(CREATURE_SINISTER_REFLECTION, x,y,z,0, TEMPSUMMON_CORPSE_DESPAWN, 0))
|
||||
pTarget->GetPosition(x, y, z);
|
||||
if (Creature* pSinisterReflection = me->SummonCreature(CREATURE_SINISTER_REFLECTION, x, y, z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0))
|
||||
{
|
||||
pSinisterReflection->SetDisplayId(pTarget->GetDisplayId());
|
||||
pSinisterReflection->AI()->AttackStart(pTarget);
|
||||
@@ -752,7 +752,7 @@ public:
|
||||
for (uint8 z = 0; z < 6; ++z)
|
||||
{
|
||||
pRandomPlayer = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
|
||||
if (!pRandomPlayer || !pRandomPlayer->HasAura(SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT,0))
|
||||
if (!pRandomPlayer || !pRandomPlayer->HasAura(SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT, 0))
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -782,7 +782,7 @@ public:
|
||||
sy = ShieldOrbLocations[0][1] + sin(ShieldOrbLocations[i][1]);
|
||||
me->SummonCreature(CREATURE_SHIELD_ORB, sx, sy, SHIELD_ORB_Z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45000);
|
||||
}
|
||||
Timer[TIMER_SUMMON_SHILEDORB] = urand(30000,60000); // 30-60seconds cooldown
|
||||
Timer[TIMER_SUMMON_SHILEDORB] = urand(30000, 60000); // 30-60seconds cooldown
|
||||
Timer[TIMER_SOUL_FLAY] = 2000;
|
||||
break;
|
||||
case TIMER_SHADOW_SPIKE: //Phase 3
|
||||
@@ -816,10 +816,10 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
Timer[TIMER_DARKNESS] = (Phase == PHASE_SACRIFICE) ? 15000 : urand(40000,70000);
|
||||
Timer[TIMER_DARKNESS] = (Phase == PHASE_SACRIFICE) ? 15000 : urand(40000, 70000);
|
||||
IsInDarkness = false;
|
||||
DoCastAOE(SPELL_DARKNESS_OF_A_THOUSAND_SOULS_DAMAGE);
|
||||
DoScriptText(RAND(SAY_KJ_DARKNESS1,SAY_KJ_DARKNESS2,SAY_KJ_DARKNESS3), me);
|
||||
DoScriptText(RAND(SAY_KJ_DARKNESS1, SAY_KJ_DARKNESS2, SAY_KJ_DARKNESS3), me);
|
||||
}
|
||||
Timer[TIMER_SOUL_FLAY] = 9000;
|
||||
}
|
||||
@@ -846,13 +846,13 @@ public:
|
||||
for (uint8 z = 0; z < 6; ++z)
|
||||
{
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
|
||||
if (!pTarget || !pTarget->HasAura(SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT,0)) break;
|
||||
if (!pTarget || !pTarget->HasAura(SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT, 0)) break;
|
||||
}
|
||||
if (pTarget)
|
||||
{
|
||||
float x, y, z;
|
||||
pTarget->GetPosition(x, y, z);
|
||||
me->SummonCreature(CREATURE_ARMAGEDDON_TARGET, x,y,z,0, TEMPSUMMON_TIMED_DESPAWN,15000);
|
||||
me->SummonCreature(CREATURE_ARMAGEDDON_TARGET, x, y, z, 0, TEMPSUMMON_TIMED_DESPAWN, 15000);
|
||||
}
|
||||
Timer[TIMER_ARMAGEDDON] = 2000; // No, I'm not kidding
|
||||
break;
|
||||
@@ -933,7 +933,7 @@ public:
|
||||
void Reset()
|
||||
{
|
||||
// TODO: Timers!
|
||||
ShadowBoltVolleyTimer = urand(8000,14000); // So they don't all cast it in the same moment.
|
||||
ShadowBoltVolleyTimer = urand(8000, 14000); // So they don't all cast it in the same moment.
|
||||
FelfirePortalTimer = 20000;
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_KILJAEDEN_EVENT, NOT_STARTED);
|
||||
@@ -989,7 +989,7 @@ public:
|
||||
// Felfire Portal - Creatres a portal, that spawns Volatile Felfire Fiends, which do suicide bombing.
|
||||
if (FelfirePortalTimer <= diff)
|
||||
{
|
||||
if (Creature* pPortal = DoSpawnCreature(CREATURE_FELFIRE_PORTAL, 0, 0,0, 0, TEMPSUMMON_TIMED_DESPAWN, 20000))
|
||||
if (Creature* pPortal = DoSpawnCreature(CREATURE_FELFIRE_PORTAL, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 20000))
|
||||
{
|
||||
std::list<HostileReference*>::iterator itr;
|
||||
for (itr = me->getThreatManager().getThreatList().begin(); itr != me->getThreatManager().getThreatList().end(); ++itr)
|
||||
@@ -1045,8 +1045,8 @@ public:
|
||||
if (uiSpawnFiendTimer <= diff)
|
||||
{
|
||||
if (Creature* pFiend = DoSpawnCreature(CREATURE_VOLATILE_FELFIRE_FIEND, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 20000))
|
||||
pFiend->AddThreat(SelectTarget(SELECT_TARGET_RANDOM,0), 100000.0f);
|
||||
uiSpawnFiendTimer = urand(4000,8000);
|
||||
pFiend->AddThreat(SelectTarget(SELECT_TARGET_RANDOM, 0), 100000.0f);
|
||||
uiSpawnFiendTimer = urand(4000, 8000);
|
||||
} else uiSpawnFiendTimer -= diff;
|
||||
}
|
||||
};
|
||||
@@ -1196,13 +1196,13 @@ public:
|
||||
{
|
||||
me->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
|
||||
bPointReached = true;
|
||||
uiTimer = urand(500,1000);
|
||||
uiTimer = urand(500, 1000);
|
||||
uiCheckTimer = 1000;
|
||||
r = 17;
|
||||
c = 0;
|
||||
mx = ShieldOrbLocations[0][0];
|
||||
my = ShieldOrbLocations[0][1];
|
||||
bClockwise = urand(0,1);
|
||||
bClockwise = urand(0, 1);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -1221,7 +1221,7 @@ public:
|
||||
}
|
||||
bPointReached = false;
|
||||
uiCheckTimer = 1000;
|
||||
me->GetMotionMaster()->MovePoint(1,x, y, SHIELD_ORB_Z);
|
||||
me->GetMotionMaster()->MovePoint(1, x, y, SHIELD_ORB_Z);
|
||||
c += M_PI/32;
|
||||
if (c >= 2*M_PI) c = 0;
|
||||
}
|
||||
@@ -1229,7 +1229,7 @@ public:
|
||||
{
|
||||
if (uiCheckTimer <= diff)
|
||||
{
|
||||
DoTeleportTo(x,y,SHIELD_ORB_Z);
|
||||
DoTeleportTo(x, y, SHIELD_ORB_Z);
|
||||
bPointReached = true;
|
||||
}
|
||||
else uiCheckTimer -= diff;
|
||||
@@ -1239,7 +1239,7 @@ public:
|
||||
{
|
||||
if (Unit* random = Unit::GetUnit(*me, pInstance ? pInstance->GetData64(DATA_PLAYER_GUID) : 0))
|
||||
DoCast(random, SPELL_SHADOW_BOLT, false);
|
||||
uiTimer = urand(500,1000);
|
||||
uiTimer = urand(500, 1000);
|
||||
} else uiTimer -= diff;
|
||||
}
|
||||
|
||||
@@ -1319,7 +1319,7 @@ public:
|
||||
if (uiTimer[1] <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SR_MOONFIRE, false);
|
||||
uiTimer[1] = urand(2000,4000);
|
||||
uiTimer[1] = urand(2000, 4000);
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
break;
|
||||
@@ -1327,19 +1327,19 @@ public:
|
||||
if (uiTimer[1] <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SR_MULTI_SHOT, false);
|
||||
uiTimer[1] = urand(8000,10000);
|
||||
uiTimer[1] = urand(8000, 10000);
|
||||
}
|
||||
if (uiTimer[2] <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SR_SHOOT, false);
|
||||
uiTimer[2] = urand(4000,6000);
|
||||
uiTimer[2] = urand(4000, 6000);
|
||||
}
|
||||
if (me->IsWithinMeleeRange(me->getVictim(), 6))
|
||||
{
|
||||
if (uiTimer[0] <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SR_MULTI_SHOT, false);
|
||||
uiTimer[0] = urand(6000,8000);
|
||||
uiTimer[0] = urand(6000, 8000);
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
@@ -1348,7 +1348,7 @@ public:
|
||||
if (uiTimer[1] <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SR_FIREBALL, false);
|
||||
uiTimer[1] = urand(2000,4000);
|
||||
uiTimer[1] = urand(2000, 4000);
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
break;
|
||||
@@ -1356,12 +1356,12 @@ public:
|
||||
if (uiTimer[1] <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SR_SHADOW_BOLT, false);
|
||||
uiTimer[1] = urand(3000,5000);
|
||||
uiTimer[1] = urand(3000, 5000);
|
||||
}
|
||||
if (uiTimer[2] <= diff)
|
||||
{
|
||||
DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true), SPELL_SR_CURSE_OF_AGONY, true);
|
||||
uiTimer[2] = urand(2000,4000);
|
||||
uiTimer[2] = urand(2000, 4000);
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
break;
|
||||
@@ -1369,7 +1369,7 @@ public:
|
||||
if (uiTimer[1] <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SR_WHIRLWIND, false);
|
||||
uiTimer[1] = urand(9000,11000);
|
||||
uiTimer[1] = urand(9000, 11000);
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
break;
|
||||
@@ -1377,12 +1377,12 @@ public:
|
||||
if (uiTimer[1] <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SR_HAMMER_OF_JUSTICE, false);
|
||||
uiTimer[1] = urand(6000,8000);
|
||||
uiTimer[1] = urand(6000, 8000);
|
||||
}
|
||||
if (uiTimer[2] <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SR_HOLY_SHOCK, false);
|
||||
uiTimer[2] = urand(2000,4000);
|
||||
uiTimer[2] = urand(2000, 4000);
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
break;
|
||||
@@ -1390,12 +1390,12 @@ public:
|
||||
if (uiTimer[1] <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SR_HOLY_SMITE, false);
|
||||
uiTimer[1] = urand(4000,6000);
|
||||
uiTimer[1] = urand(4000, 6000);
|
||||
}
|
||||
if (uiTimer[2] <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_SR_RENEW, false);
|
||||
uiTimer[2] = urand(6000,8000);
|
||||
uiTimer[2] = urand(6000, 8000);
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
break;
|
||||
@@ -1403,7 +1403,7 @@ public:
|
||||
if (uiTimer[1] <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SR_EARTH_SHOCK, false);
|
||||
uiTimer[1] = urand(4000,6000);
|
||||
uiTimer[1] = urand(4000, 6000);
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
break;
|
||||
@@ -1411,7 +1411,7 @@ public:
|
||||
if (uiTimer[1] <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SR_HEMORRHAGE, true);
|
||||
uiTimer[1] = urand(4000,6000);
|
||||
uiTimer[1] = urand(4000, 6000);
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
break;
|
||||
|
||||
@@ -148,16 +148,16 @@ public:
|
||||
switch(summoned->GetEntry())
|
||||
{
|
||||
case CREATURE_DARK_FIENDS:
|
||||
summoned->CastSpell(summoned,SPELL_DARKFIEND_VISUAL,false);
|
||||
summoned->CastSpell(summoned, SPELL_DARKFIEND_VISUAL, false);
|
||||
break;
|
||||
case CREATURE_DARKNESS:
|
||||
summoned->AddUnitState(UNIT_STAT_STUNNED);
|
||||
float x,y,z,o;
|
||||
summoned->GetHomePosition(x,y,z,o);
|
||||
me->SummonCreature(CREATURE_DARK_FIENDS, x,y,z,o, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
float x, y, z, o;
|
||||
summoned->GetHomePosition(x, y, z, o);
|
||||
me->SummonCreature(CREATURE_DARK_FIENDS, x, y, z, o, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
break;
|
||||
}
|
||||
summoned->AI()->AttackStart(SelectTarget(SELECT_TARGET_RANDOM,0, 50, true));
|
||||
summoned->AI()->AttackStart(SelectTarget(SELECT_TARGET_RANDOM, 0, 50, true));
|
||||
Summons.Summon(summoned);
|
||||
}
|
||||
|
||||
@@ -248,7 +248,7 @@ public:
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
DoCastAOE(SPELL_NEGATIVE_ENERGY,false);
|
||||
DoCastAOE(SPELL_NEGATIVE_ENERGY, false);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_MURU_EVENT, IN_PROGRESS);
|
||||
@@ -276,10 +276,10 @@ public:
|
||||
me->SetVisible(false);
|
||||
break;
|
||||
case CREATURE_DARK_FIENDS:
|
||||
summoned->CastSpell(summoned,SPELL_DARKFIEND_VISUAL,false);
|
||||
summoned->CastSpell(summoned, SPELL_DARKFIEND_VISUAL, false);
|
||||
break;
|
||||
}
|
||||
summoned->AI()->AttackStart(SelectTarget(SELECT_TARGET_RANDOM,0, 50, true));
|
||||
summoned->AI()->AttackStart(SelectTarget(SELECT_TARGET_RANDOM, 0, 50, true));
|
||||
Summons.Summon(summoned);
|
||||
}
|
||||
|
||||
@@ -331,13 +331,13 @@ public:
|
||||
{
|
||||
DarkFiend = false;
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
me->SummonCreature(CREATURE_DARK_FIENDS,DarkFiends[i][0],DarkFiends[i][1],DarkFiends[i][2], DarkFiends[i][3], TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
me->SummonCreature(CREATURE_DARK_FIENDS, DarkFiends[i][0], DarkFiends[i][1], DarkFiends[i][2], DarkFiends[i][3], TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
Timer[TIMER_DARKNESS] = 42000;
|
||||
}
|
||||
break;
|
||||
case TIMER_HUMANOIDES:
|
||||
for (uint8 i = 0; i < 6; ++i)
|
||||
me->SummonCreature(uint32(Humanoides[i][0]),Humanoides[i][1],Humanoides[i][2],Humanoides[i][3], Humanoides[i][4], TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
me->SummonCreature(uint32(Humanoides[i][0]), Humanoides[i][1], Humanoides[i][2], Humanoides[i][3], Humanoides[i][4], TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
Timer[TIMER_HUMANOIDES] = 60000;
|
||||
break;
|
||||
case TIMER_PHASE:
|
||||
@@ -415,9 +415,9 @@ public:
|
||||
|
||||
void SpellHit(Unit* /*caster*/, const SpellEntry* Spell)
|
||||
{
|
||||
float x,y,z,o;
|
||||
me->GetHomePosition(x,y,z,o);
|
||||
DoTeleportTo(x,y,z);
|
||||
float x, y, z, o;
|
||||
me->GetHomePosition(x, y, z, o);
|
||||
DoTeleportTo(x, y, z);
|
||||
InAction = true;
|
||||
switch(Spell->Id)
|
||||
{
|
||||
@@ -535,15 +535,15 @@ public:
|
||||
PulseTimer = 3000;
|
||||
VoidBlastTimer = 45000; //is this a correct timer?
|
||||
|
||||
float x,y,z,o;
|
||||
me->GetHomePosition(x,y,z,o);
|
||||
DoTeleportTo(x,y,71);
|
||||
float x, y, z, o;
|
||||
me->GetHomePosition(x, y, z, o);
|
||||
DoTeleportTo(x, y, 71);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
me->SummonCreature(CREATURE_VOID_SPAWN, me->GetPositionX(),me->GetPositionY(),me->GetPositionZ(), float(rand()%6), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180000);
|
||||
me->SummonCreature(CREATURE_VOID_SPAWN, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), float(rand()%6), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180000);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -629,7 +629,7 @@ public:
|
||||
me->RemoveAura(SPELL_BLACKHOLE_GROW, 1);
|
||||
break;
|
||||
case 3:
|
||||
SpellTimer = urand(400,900);
|
||||
SpellTimer = urand(400, 900);
|
||||
NeedForAHack = 1;
|
||||
if (Unit* Temp = me->getVictim())
|
||||
{
|
||||
|
||||
@@ -129,7 +129,7 @@ public:
|
||||
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
{
|
||||
Player* plr = itr->getSource();
|
||||
if (plr && !plr->HasAura(45839,0))
|
||||
if (plr && !plr->HasAura(45839, 0))
|
||||
return plr;
|
||||
}
|
||||
}
|
||||
@@ -226,15 +226,15 @@ public:
|
||||
{
|
||||
if (data == NOT_STARTED || data == DONE)
|
||||
{
|
||||
HandleGameObject(ForceField,true);
|
||||
HandleGameObject(KalecgosWall[0],true);
|
||||
HandleGameObject(KalecgosWall[1],true);
|
||||
HandleGameObject(ForceField, true);
|
||||
HandleGameObject(KalecgosWall[0], true);
|
||||
HandleGameObject(KalecgosWall[1], true);
|
||||
}
|
||||
else if (data == IN_PROGRESS)
|
||||
{
|
||||
HandleGameObject(ForceField,false);
|
||||
HandleGameObject(KalecgosWall[0],false);
|
||||
HandleGameObject(KalecgosWall[1],false);
|
||||
HandleGameObject(ForceField, false);
|
||||
HandleGameObject(KalecgosWall[0], false);
|
||||
HandleGameObject(KalecgosWall[1], false);
|
||||
}
|
||||
m_auiEncounter[0] = data;
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ class boss_archaedas : public CreatureScript
|
||||
if (pMinion && pMinion->isAlive())
|
||||
{
|
||||
DoCast(pMinion, SPELL_AWAKEN_VAULT_WALKER, bFlag);
|
||||
pMinion->CastSpell(pMinion, SPELL_ARCHAEDAS_AWAKEN,true);
|
||||
pMinion->CastSpell(pMinion, SPELL_ARCHAEDAS_AWAKEN, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ class boss_archaedas : public CreatureScript
|
||||
{
|
||||
me->setFaction(14);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_DISABLE_MOVE);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE);
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*caster*/, const SpellEntry *spell)
|
||||
@@ -118,7 +118,7 @@ class boss_archaedas : public CreatureScript
|
||||
if (spell == GetSpellStore()->LookupEntry(SPELL_ARCHAEDAS_AWAKEN))
|
||||
{
|
||||
me->MonsterYell(SAY_AGGRO, LANG_UNIVERSAL, 0);
|
||||
DoPlaySoundToSet(me,SOUND_AGGRO);
|
||||
DoPlaySoundToSet(me, SOUND_AGGRO);
|
||||
iAwakenTimer = 4000;
|
||||
bWakingUp = true;
|
||||
}
|
||||
@@ -161,12 +161,12 @@ class boss_archaedas : public CreatureScript
|
||||
//If we are <66 summon the guardians
|
||||
if (!bGuardiansAwake && !HealthAbovePct(66))
|
||||
{
|
||||
ActivateMinion(pInstance->GetData64(5),true); // EarthenGuardian1
|
||||
ActivateMinion(pInstance->GetData64(6),true); // EarthenGuardian2
|
||||
ActivateMinion(pInstance->GetData64(7),true); // EarthenGuardian3
|
||||
ActivateMinion(pInstance->GetData64(8),true); // EarthenGuardian4
|
||||
ActivateMinion(pInstance->GetData64(9),true); // EarthenGuardian5
|
||||
ActivateMinion(pInstance->GetData64(10),false); // EarthenGuardian6
|
||||
ActivateMinion(pInstance->GetData64(5), true); // EarthenGuardian1
|
||||
ActivateMinion(pInstance->GetData64(6), true); // EarthenGuardian2
|
||||
ActivateMinion(pInstance->GetData64(7), true); // EarthenGuardian3
|
||||
ActivateMinion(pInstance->GetData64(8), true); // EarthenGuardian4
|
||||
ActivateMinion(pInstance->GetData64(9), true); // EarthenGuardian5
|
||||
ActivateMinion(pInstance->GetData64(10), false); // EarthenGuardian6
|
||||
me->MonsterYell(SAY_SUMMON, LANG_UNIVERSAL, 0);
|
||||
DoPlaySoundToSet(me, SOUND_SUMMON);
|
||||
bGuardiansAwake = true;
|
||||
@@ -175,10 +175,10 @@ class boss_archaedas : public CreatureScript
|
||||
//If we are <33 summon the vault walkers
|
||||
if (!bVaultWalkersAwake && !HealthAbovePct(33))
|
||||
{
|
||||
ActivateMinion(pInstance->GetData64(1),true); // VaultWalker1
|
||||
ActivateMinion(pInstance->GetData64(2),true); // VaultWalker2
|
||||
ActivateMinion(pInstance->GetData64(3),true); // VaultWalker3
|
||||
ActivateMinion(pInstance->GetData64(4),false); // VaultWalker4
|
||||
ActivateMinion(pInstance->GetData64(1), true); // VaultWalker1
|
||||
ActivateMinion(pInstance->GetData64(2), true); // VaultWalker2
|
||||
ActivateMinion(pInstance->GetData64(3), true); // VaultWalker3
|
||||
ActivateMinion(pInstance->GetData64(4), false); // VaultWalker4
|
||||
me->MonsterYell(SAY_SUMMON2, LANG_UNIVERSAL, 0);
|
||||
DoPlaySoundToSet(me, SOUND_SUMMON2);
|
||||
bVaultWalkersAwake = true;
|
||||
@@ -364,7 +364,7 @@ class mob_stonekeepers : public CreatureScript
|
||||
|
||||
void JustDied(Unit * /*attacker*/)
|
||||
{
|
||||
DoCast (me, SPELL_SELF_DESTRUCT,true);
|
||||
DoCast (me, SPELL_SELF_DESTRUCT, true);
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_STONE_KEEPERS, IN_PROGRESS); // activate next stonekeeper
|
||||
}
|
||||
@@ -402,7 +402,7 @@ class go_altar_of_archaedas : public GameObjectScript
|
||||
|
||||
pPlayer->CastSpell (pPlayer, SPELL_BOSS_OBJECT_VISUAL, false);
|
||||
|
||||
pInstance->SetData64(0,pPlayer->GetGUID()); // activate archaedas
|
||||
pInstance->SetData64(0, pPlayer->GetGUID()); // activate archaedas
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -148,7 +148,7 @@ class instance_uldaman : public InstanceMapScript
|
||||
{
|
||||
creature->setFaction(35);
|
||||
creature->RemoveAllAuras();
|
||||
//creature->RemoveFlag (UNIT_FIELD_FLAGS,UNIT_FLAG_ANIMATION_FROZEN);
|
||||
//creature->RemoveFlag (UNIT_FIELD_FLAGS, UNIT_FLAG_ANIMATION_FROZEN);
|
||||
creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE);
|
||||
}
|
||||
@@ -178,7 +178,7 @@ class instance_uldaman : public InstanceMapScript
|
||||
Creature* pTarget = instance->GetCreature(*i);
|
||||
if (!pTarget || !pTarget->isAlive() || pTarget->getFaction() == 14)
|
||||
continue;
|
||||
pTarget->RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_DISABLE_MOVE);
|
||||
pTarget->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE);
|
||||
pTarget->setFaction(14);
|
||||
pTarget->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
return; // only want the first one we find
|
||||
@@ -200,7 +200,7 @@ class instance_uldaman : public InstanceMapScript
|
||||
if (!pTarget || !pTarget->isAlive() || pTarget->getFaction() == 14)
|
||||
continue;
|
||||
archaedas->CastSpell(pTarget, SPELL_AWAKEN_VAULT_WALKER, true);
|
||||
pTarget->CastSpell(pTarget, SPELL_ARCHAEDAS_AWAKEN,true);
|
||||
pTarget->CastSpell(pTarget, SPELL_ARCHAEDAS_AWAKEN, true);
|
||||
return; // only want the first one we find
|
||||
}
|
||||
}
|
||||
@@ -247,7 +247,7 @@ class instance_uldaman : public InstanceMapScript
|
||||
|
||||
if (Unit::GetUnit(*archaedas, target))
|
||||
{
|
||||
archaedas->CastSpell(archaedas, SPELL_ARCHAEDAS_AWAKEN,false);
|
||||
archaedas->CastSpell(archaedas, SPELL_ARCHAEDAS_AWAKEN, false);
|
||||
uiWhoWokeuiArchaedasGUID = target;
|
||||
}
|
||||
}
|
||||
@@ -259,7 +259,7 @@ class instance_uldaman : public InstanceMapScript
|
||||
return;
|
||||
|
||||
ironaya->setFaction(415);
|
||||
ironaya->RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_DISABLE_MOVE);
|
||||
ironaya->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE);
|
||||
ironaya->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
|
||||
|
||||
@@ -104,9 +104,9 @@ class boss_akilzon : public CreatureScript
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_AKILZONEVENT, NOT_STARTED);
|
||||
|
||||
StaticDisruption_Timer = urand(10000,20000); //10 to 20 seconds (bosskillers)
|
||||
GustOfWind_Timer = urand(20000,30000); //20 to 30 seconds(bosskillers)
|
||||
CallLighting_Timer = urand(10000,20000); //totaly random timer. can't find any info on this
|
||||
StaticDisruption_Timer = urand(10000, 20000); //10 to 20 seconds (bosskillers)
|
||||
GustOfWind_Timer = urand(20000, 30000); //20 to 30 seconds(bosskillers)
|
||||
CallLighting_Timer = urand(10000, 20000); //totaly random timer. can't find any info on this
|
||||
ElectricalStorm_Timer = 60000; //60 seconds(bosskillers)
|
||||
Enrage_Timer = 10*MINUTE*IN_MILLISECONDS; //10 minutes till enrage(bosskillers)
|
||||
SummonEagles_Timer = 99999;
|
||||
@@ -146,7 +146,7 @@ class boss_akilzon : public CreatureScript
|
||||
|
||||
void KilledUnit(Unit* /*victim*/)
|
||||
{
|
||||
switch (urand(0,1))
|
||||
switch (urand(0, 1))
|
||||
{
|
||||
case 0:
|
||||
me->MonsterYell(SAY_ONSLAY1, LANG_UNIVERSAL, 0);
|
||||
@@ -163,7 +163,7 @@ class boss_akilzon : public CreatureScript
|
||||
{
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
{
|
||||
Unit* bird = Unit::GetUnit(*me,BirdGUIDs[i]);
|
||||
Unit* bird = Unit::GetUnit(*me, BirdGUIDs[i]);
|
||||
if (bird && bird->isAlive())
|
||||
{
|
||||
bird->SetVisible(false);
|
||||
@@ -219,7 +219,7 @@ class boss_akilzon : public CreatureScript
|
||||
}
|
||||
}
|
||||
// visual
|
||||
float x,y,z;
|
||||
float x, y, z;
|
||||
z = me->GetPositionZ();
|
||||
for (uint8 i = 0; i < 5+rand()%5; ++i)
|
||||
{
|
||||
@@ -232,7 +232,7 @@ class boss_akilzon : public CreatureScript
|
||||
trigger->SetHealth(100000);
|
||||
trigger->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
if (Cloud)
|
||||
Cloud->CastCustomSpell(trigger, /*43661*/43137, &bp0, NULL, NULL,true, 0, 0, Cloud->GetGUID());
|
||||
Cloud->CastCustomSpell(trigger, /*43661*/43137, &bp0, NULL, NULL, true, 0, 0, Cloud->GetGUID());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -244,7 +244,7 @@ class boss_akilzon : public CreatureScript
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
CloudGUID = 0;
|
||||
if (Cloud)
|
||||
Cloud->DealDamage(Cloud, Cloud->GetHealth(),NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
Cloud->DealDamage(Cloud, Cloud->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
SetWeather(WEATHER_STATE_FINE, 0.0f);
|
||||
isRaining = false;
|
||||
}
|
||||
@@ -325,12 +325,12 @@ class boss_akilzon : public CreatureScript
|
||||
}
|
||||
pTarget->CastSpell(pTarget, 44007, true);//cloud visual
|
||||
DoCast(pTarget, SPELL_ELECTRICAL_STORM, false);//storm cyclon + visual
|
||||
float x,y,z;
|
||||
pTarget->GetPosition(x,y,z);
|
||||
float x, y, z;
|
||||
pTarget->GetPosition(x, y, z);
|
||||
if (pTarget)
|
||||
{
|
||||
pTarget->SetUnitMovementFlags(MOVEMENTFLAG_LEVITATING);
|
||||
pTarget->SendMonsterMove(x,y,me->GetPositionZ()+15,0);
|
||||
pTarget->SendMonsterMove(x, y, me->GetPositionZ()+15, 0);
|
||||
}
|
||||
Unit *Cloud = me->SummonTrigger(x, y, me->GetPositionZ()+16, 0, 15000);
|
||||
if (Cloud)
|
||||
@@ -359,16 +359,16 @@ class boss_akilzon : public CreatureScript
|
||||
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
{
|
||||
Unit* bird = Unit::GetUnit(*me,BirdGUIDs[i]);
|
||||
Unit* bird = Unit::GetUnit(*me, BirdGUIDs[i]);
|
||||
if (!bird) //they despawned on die
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
x = pTarget->GetPositionX() + irand(-10,10);
|
||||
y = pTarget->GetPositionY() + irand(-10,10);
|
||||
z = pTarget->GetPositionZ() + urand(16,20);
|
||||
x = pTarget->GetPositionX() + irand(-10, 10);
|
||||
y = pTarget->GetPositionY() + irand(-10, 10);
|
||||
z = pTarget->GetPositionZ() + urand(16, 20);
|
||||
if (z > 95)
|
||||
z = 95.0f - urand(0,5);
|
||||
z = 95.0f - urand(0, 5);
|
||||
}
|
||||
Creature *pCreature = me->SummonCreature(MOB_SOARING_EAGLE, x, y, z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
if (pCreature)
|
||||
@@ -448,11 +448,11 @@ class mob_akilzon_eagle : public CreatureScript
|
||||
float x, y, z;
|
||||
if (EagleSwoop_Timer)
|
||||
{
|
||||
x = pTarget->GetPositionX() + irand(-10,10);
|
||||
y = pTarget->GetPositionY() + irand(-10,10);
|
||||
z = pTarget->GetPositionZ() + urand(10,15);
|
||||
x = pTarget->GetPositionX() + irand(-10, 10);
|
||||
y = pTarget->GetPositionY() + irand(-10, 10);
|
||||
z = pTarget->GetPositionZ() + urand(10, 15);
|
||||
if (z > 95)
|
||||
z = 95.0f - urand(0,5);
|
||||
z = 95.0f - urand(0, 5);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -186,7 +186,7 @@ class boss_halazzi : public CreatureScript
|
||||
break;
|
||||
case PHASE_HUMAN:
|
||||
//DoCast(me, SPELL_SUMMON_LYNX, true);
|
||||
DoSpawnCreature(MOB_SPIRIT_LYNX, 5,5,0,0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
DoSpawnCreature(MOB_SPIRIT_LYNX, 5, 5, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
me->SetMaxHealth(400000);
|
||||
me->SetHealth(400000);
|
||||
ShockTimer = 10000;
|
||||
@@ -238,7 +238,7 @@ class boss_halazzi : public CreatureScript
|
||||
if (FrenzyTimer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_FRENZY);
|
||||
FrenzyTimer = urand(10000,15000);
|
||||
FrenzyTimer = urand(10000, 15000);
|
||||
} else FrenzyTimer -= diff;
|
||||
|
||||
if (Phase == PHASE_LYNX)
|
||||
@@ -262,7 +262,7 @@ class boss_halazzi : public CreatureScript
|
||||
|
||||
if (ShockTimer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
if (pTarget->IsNonMeleeSpellCasted(false))
|
||||
DoCast(pTarget, SPELL_EARTHSHOCK);
|
||||
@@ -315,7 +315,7 @@ class boss_halazzi : public CreatureScript
|
||||
|
||||
void KilledUnit(Unit* /*victim*/)
|
||||
{
|
||||
switch (urand(0,1))
|
||||
switch (urand(0, 1))
|
||||
{
|
||||
case 0:
|
||||
me->MonsterYell(YELL_KILL_ONE, LANG_UNIVERSAL, 0);
|
||||
@@ -364,7 +364,7 @@ class mob_halazzi_lynx : public CreatureScript
|
||||
|
||||
void Reset()
|
||||
{
|
||||
FrenzyTimer = urand(30000,50000); //frenzy every 30-50 seconds
|
||||
FrenzyTimer = urand(30000, 50000); //frenzy every 30-50 seconds
|
||||
shredder_timer = 4000;
|
||||
}
|
||||
|
||||
@@ -390,7 +390,7 @@ class mob_halazzi_lynx : public CreatureScript
|
||||
if (FrenzyTimer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_LYNX_FRENZY);
|
||||
FrenzyTimer = urand(30000,50000); //frenzy every 30-50 seconds
|
||||
FrenzyTimer = urand(30000, 50000); //frenzy every 30-50 seconds
|
||||
} else FrenzyTimer -= diff;
|
||||
|
||||
if (shredder_timer <= diff)
|
||||
|
||||
@@ -264,7 +264,7 @@ class boss_hexlord_malacrass : public CreatureScript
|
||||
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
{
|
||||
Unit* Temp = Unit::GetUnit((*me),AddGUID[i]);
|
||||
Unit* Temp = Unit::GetUnit((*me), AddGUID[i]);
|
||||
if (Temp && Temp->isAlive())
|
||||
CAST_CRE(Temp)->AI()->AttackStart(me->getVictim());
|
||||
else
|
||||
@@ -277,7 +277,7 @@ class boss_hexlord_malacrass : public CreatureScript
|
||||
|
||||
void KilledUnit(Unit* /*victim*/)
|
||||
{
|
||||
switch (urand(0,1))
|
||||
switch (urand(0, 1))
|
||||
{
|
||||
case 0:
|
||||
me->MonsterYell(YELL_KILL_ONE, LANG_UNIVERSAL, 0);
|
||||
@@ -300,7 +300,7 @@ class boss_hexlord_malacrass : public CreatureScript
|
||||
|
||||
for (uint8 i = 0; i < 4 ; ++i)
|
||||
{
|
||||
Unit* Temp = Unit::GetUnit((*me),AddGUID[i]);
|
||||
Unit* Temp = Unit::GetUnit((*me), AddGUID[i]);
|
||||
if (Temp && Temp->isAlive())
|
||||
Temp->DealDamage(Temp, Temp->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
}
|
||||
@@ -371,7 +371,7 @@ class boss_hexlord_malacrass : public CreatureScript
|
||||
DoCast(me, SPELL_DRAIN_POWER, true);
|
||||
me->MonsterYell(YELL_DRAIN_POWER, LANG_UNIVERSAL, 0);
|
||||
DoPlaySoundToSet(me, SOUND_YELL_DRAIN_POWER);
|
||||
DrainPower_Timer = urand(40000,55000); // must cast in 60 sec, or buff/debuff will disappear
|
||||
DrainPower_Timer = urand(40000, 55000); // must cast in 60 sec, or buff/debuff will disappear
|
||||
} else DrainPower_Timer -= diff;
|
||||
|
||||
if (SpiritBolts_Timer <= diff)
|
||||
@@ -410,7 +410,7 @@ class boss_hexlord_malacrass : public CreatureScript
|
||||
//me->SetUInt32Value(UNIT_CHANNEL_SPELL, SPELL_SIPHON_SOUL);
|
||||
|
||||
PlayerGUID = pTarget->GetGUID();
|
||||
PlayerAbility_Timer = urand(8000,10000);
|
||||
PlayerAbility_Timer = urand(8000, 10000);
|
||||
PlayerClass = pTarget->getClass() - 1;
|
||||
|
||||
if (PlayerClass == CLASS_DRUID-1)
|
||||
@@ -428,7 +428,7 @@ class boss_hexlord_malacrass : public CreatureScript
|
||||
//if (pTarget && pTarget->isAlive())
|
||||
//{
|
||||
UseAbility();
|
||||
PlayerAbility_Timer = urand(8000,10000);
|
||||
PlayerAbility_Timer = urand(8000, 10000);
|
||||
//}
|
||||
} else PlayerAbility_Timer -= diff;
|
||||
|
||||
@@ -437,7 +437,7 @@ class boss_hexlord_malacrass : public CreatureScript
|
||||
|
||||
void UseAbility()
|
||||
{
|
||||
uint8 random = urand(0,2);
|
||||
uint8 random = urand(0, 2);
|
||||
Unit *pTarget = NULL;
|
||||
switch(PlayerAbility[PlayerClass][random].target)
|
||||
{
|
||||
@@ -599,7 +599,7 @@ class boss_alyson_antille : public CreatureScript
|
||||
}
|
||||
else
|
||||
{
|
||||
if (urand(0,1))
|
||||
if (urand(0, 1))
|
||||
pTarget = DoSelectLowestHpFriendly(50, 0);
|
||||
else
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
@@ -611,7 +611,7 @@ class boss_alyson_antille : public CreatureScript
|
||||
|
||||
/*if (dispelmagic_timer <= diff)
|
||||
{
|
||||
if (urand(0,1))
|
||||
if (urand(0, 1))
|
||||
{
|
||||
Unit *pTarget = SelectTarget();
|
||||
|
||||
@@ -865,7 +865,7 @@ class boss_fenstalker : public CreatureScript
|
||||
if (volatileinf_timer <= diff)
|
||||
{
|
||||
// core bug
|
||||
me->getVictim()->CastSpell(me->getVictim(),SPELL_VOLATILE_INFECTION, false);
|
||||
me->getVictim()->CastSpell(me->getVictim(), SPELL_VOLATILE_INFECTION, false);
|
||||
volatileinf_timer = 12000;
|
||||
} else volatileinf_timer -= diff;
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user