Merge branch 'master' into Playerbot
This commit is contained in:
@@ -19,8 +19,8 @@
|
||||
#define AuthSocketMgr_h__
|
||||
|
||||
#include "AuthSession.h"
|
||||
#include "SocketMgr.h"
|
||||
#include "Config.h"
|
||||
#include "SocketMgr.h"
|
||||
|
||||
class AuthSocketMgr : public SocketMgr<AuthSession>
|
||||
{
|
||||
|
||||
@@ -4335,6 +4335,13 @@ PlayerDump.DisallowOverwrite = 1
|
||||
ICC.Buff.Horde = 73822
|
||||
ICC.Buff.Alliance = 73828
|
||||
|
||||
#
|
||||
# WipeGunshipBlizzlike.Enable
|
||||
# Description: Wipe the gunship fight if no player is on the deck.
|
||||
# Default: 1 - (Blizzlike)
|
||||
|
||||
WipeGunshipBlizzlike.Enable = 1
|
||||
|
||||
#
|
||||
# Minigob.Manabonk.Enable
|
||||
# Description: Enable/ Disable Minigob Manabonk
|
||||
|
||||
@@ -95,7 +95,7 @@ void CharacterDatabaseConnection::DoPrepareStatements()
|
||||
PrepareStatement(CHAR_SEL_MAIL_SERVER_CHARACTER, "SELECT mailId from mail_server_character WHERE guid = ? and mailId = ?", CONNECTION_ASYNC);
|
||||
PrepareStatement(CHAR_REP_MAIL_SERVER_CHARACTER, "REPLACE INTO mail_server_character (guid, mailId) values (?, ?)", CONNECTION_ASYNC);
|
||||
PrepareStatement(CHAR_SEL_CHARACTER_SOCIALLIST, "SELECT friend, flags, note FROM character_social JOIN characters ON characters.guid = character_social.friend WHERE character_social.guid = ? AND deleteinfos_name IS NULL LIMIT 255", CONNECTION_ASYNC);
|
||||
PrepareStatement(CHAR_SEL_CHARACTER_HOMEBIND, "SELECT mapId, zoneId, posX, posY, posZ, posO FROM character_homebind WHERE guid = ?", CONNECTION_BOTH);
|
||||
PrepareStatement(CHAR_SEL_CHARACTER_HOMEBIND, "SELECT mapId, zoneId, posX, posY, posZ FROM character_homebind WHERE guid = ?", CONNECTION_BOTH);
|
||||
PrepareStatement(CHAR_SEL_CHARACTER_SPELLCOOLDOWNS, "SELECT spell, category, item, time, needSend FROM character_spell_cooldown WHERE guid = ?", CONNECTION_ASYNC);
|
||||
PrepareStatement(CHAR_SEL_CHARACTER_DECLINEDNAMES, "SELECT genitive, dative, accusative, instrumental, prepositional FROM character_declinedname WHERE guid = ?", CONNECTION_ASYNC);
|
||||
PrepareStatement(CHAR_SEL_CHARACTER_ACHIEVEMENTS, "SELECT achievement, date FROM character_achievement WHERE guid = ?", CONNECTION_ASYNC);
|
||||
@@ -290,8 +290,8 @@ void CharacterDatabaseConnection::DoPrepareStatements()
|
||||
PrepareStatement(CHAR_DEL_PLAYER_ENTRY_POINT, "DELETE FROM character_entry_point WHERE guid = ?", CONNECTION_ASYNC);
|
||||
|
||||
// Character homebind
|
||||
PrepareStatement(CHAR_INS_PLAYER_HOMEBIND, "INSERT INTO character_homebind (guid, mapId, zoneId, posX, posY, posZ, posO) VALUES (?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC);
|
||||
PrepareStatement(CHAR_UPD_PLAYER_HOMEBIND, "UPDATE character_homebind SET mapId = ?, zoneId = ?, posX = ?, posY = ?, posZ = ?, posO = ? WHERE guid = ?", CONNECTION_ASYNC);
|
||||
PrepareStatement(CHAR_INS_PLAYER_HOMEBIND, "INSERT INTO character_homebind (guid, mapId, zoneId, posX, posY, posZ) VALUES (?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC);
|
||||
PrepareStatement(CHAR_UPD_PLAYER_HOMEBIND, "UPDATE character_homebind SET mapId = ?, zoneId = ?, posX = ?, posY = ?, posZ = ? WHERE guid = ?", CONNECTION_ASYNC);
|
||||
PrepareStatement(CHAR_DEL_PLAYER_HOMEBIND, "DELETE FROM character_homebind WHERE guid = ?", CONNECTION_ASYNC);
|
||||
|
||||
// Corpse
|
||||
@@ -407,7 +407,7 @@ void CharacterDatabaseConnection::DoPrepareStatements()
|
||||
PrepareStatement(CHAR_SEL_PINFO_BANS, "SELECT unbandate, bandate = unbandate, bannedby, banreason FROM character_banned WHERE guid = ? AND active ORDER BY bandate ASC LIMIT 1", CONNECTION_SYNCH);
|
||||
PrepareStatement(CHAR_SEL_PINFO_MAILS, "SELECT SUM(CASE WHEN (checked & 1) THEN 1 ELSE 0 END) AS 'readmail', COUNT(*) AS 'totalmail' FROM mail WHERE `receiver` = ?", CONNECTION_SYNCH);
|
||||
PrepareStatement(CHAR_SEL_PINFO_XP, "SELECT a.xp, b.guid FROM characters a LEFT JOIN guild_member b ON a.guid = b.guid WHERE a.guid = ?", CONNECTION_SYNCH);
|
||||
PrepareStatement(CHAR_SEL_CHAR_HOMEBIND, "SELECT mapId, zoneId, posX, posY, posZ, posO FROM character_homebind WHERE guid = ?", CONNECTION_SYNCH);
|
||||
PrepareStatement(CHAR_SEL_CHAR_HOMEBIND, "SELECT mapId, zoneId, posX, posY, posZ FROM character_homebind WHERE guid = ?", CONNECTION_SYNCH);
|
||||
PrepareStatement(CHAR_SEL_CHAR_GUID_NAME_BY_ACC, "SELECT guid, name FROM characters WHERE account = ?", CONNECTION_SYNCH);
|
||||
PrepareStatement(CHAR_SEL_POOL_QUEST_SAVE, "SELECT quest_id FROM pool_quest_save WHERE pool_id = ?", CONNECTION_SYNCH);
|
||||
PrepareStatement(CHAR_SEL_CHARACTER_AT_LOGIN, "SELECT at_login FROM characters WHERE guid = ?", CONNECTION_SYNCH);
|
||||
|
||||
@@ -281,7 +281,7 @@ bool ArenaTeam::LoadMembersFromDB(QueryResult result)
|
||||
|
||||
bool ArenaTeam::SetName(std::string const& name)
|
||||
{
|
||||
if (TeamName == name || name.empty() || name.length() > 24 || sObjectMgr->IsReservedName(name) || sObjectMgr->IsProfanityName(name) || !ObjectMgr::IsValidCharterName(name))
|
||||
if (TeamName == name || name.empty() || name.length() > 24 || !ObjectMgr::IsValidCharterName(name))
|
||||
return false;
|
||||
|
||||
TeamName = name;
|
||||
|
||||
@@ -116,7 +116,7 @@ namespace lfg
|
||||
sLFGMgr->LeaveLfg(player->GetGUID());
|
||||
sLFGMgr->LeaveAllLfgQueues(player->GetGUID(), true);
|
||||
player->RemoveAurasDueToSpell(LFG_SPELL_LUCK_OF_THE_DRAW);
|
||||
player->TeleportTo(player->m_homebindMapId, player->m_homebindX, player->m_homebindY, player->m_homebindZ, player->m_homebindO);
|
||||
player->TeleportTo(player->m_homebindMapId, player->m_homebindX, player->m_homebindY, player->m_homebindZ, 0.0f);
|
||||
LOG_DEBUG("lfg", "LFGPlayerScript::OnMapChanged, Player {} ({}) is in LFG dungeon map but does not have a valid group! Teleporting to homebind.",
|
||||
player->GetName(), player->GetGUID().ToString());
|
||||
return;
|
||||
|
||||
@@ -345,7 +345,6 @@ Player::Player(WorldSession* session): Unit(true), m_mover(this)
|
||||
m_homebindX = 0;
|
||||
m_homebindY = 0;
|
||||
m_homebindZ = 0;
|
||||
m_homebindO = 0;
|
||||
|
||||
m_contestedPvPTimer = 0;
|
||||
|
||||
@@ -1606,7 +1605,7 @@ bool Player::TeleportToEntryPoint()
|
||||
|
||||
if (loc.m_mapId == MAPID_INVALID)
|
||||
{
|
||||
return TeleportTo(m_homebindMapId, m_homebindX, m_homebindY, m_homebindZ, m_homebindO);
|
||||
return TeleportTo(m_homebindMapId, m_homebindX, m_homebindY, m_homebindZ, GetOrientation());
|
||||
}
|
||||
|
||||
return TeleportTo(loc);
|
||||
@@ -4913,7 +4912,7 @@ void Player::RepopAtGraveyard()
|
||||
}
|
||||
}
|
||||
else if (GetPositionZ() < GetMap()->GetMinHeight(GetPositionX(), GetPositionY()))
|
||||
TeleportTo(m_homebindMapId, m_homebindX, m_homebindY, m_homebindZ, m_homebindO);
|
||||
TeleportTo(m_homebindMapId, m_homebindX, m_homebindY, m_homebindZ, GetOrientation());
|
||||
|
||||
RemovePlayerFlag(PLAYER_FLAGS_IS_OUT_OF_BOUNDS);
|
||||
}
|
||||
@@ -11264,7 +11263,7 @@ void Player::SetEntryPoint()
|
||||
}
|
||||
|
||||
if (m_entryPointData.joinPos.m_mapId == MAPID_INVALID)
|
||||
m_entryPointData.joinPos = WorldLocation(m_homebindMapId, m_homebindX, m_homebindY, m_homebindZ, m_homebindO);
|
||||
m_entryPointData.joinPos = WorldLocation(m_homebindMapId, m_homebindX, m_homebindY, m_homebindZ, 0.0f);
|
||||
}
|
||||
|
||||
void Player::LeaveBattleground(Battleground* bg)
|
||||
|
||||
@@ -2349,7 +2349,6 @@ public:
|
||||
float m_homebindX;
|
||||
float m_homebindY;
|
||||
float m_homebindZ;
|
||||
float m_homebindO;
|
||||
|
||||
[[nodiscard]] WorldLocation GetStartPosition() const;
|
||||
|
||||
|
||||
@@ -4913,7 +4913,7 @@ bool Player::LoadPositionFromDB(uint32& mapid, float& x, float& y, float& z, flo
|
||||
|
||||
void Player::SetHomebind(WorldLocation const& loc, uint32 areaId)
|
||||
{
|
||||
loc.GetPosition(m_homebindX, m_homebindY, m_homebindZ, m_homebindO);
|
||||
loc.GetPosition(m_homebindX, m_homebindY, m_homebindZ);
|
||||
m_homebindMapId = loc.GetMapId();
|
||||
m_homebindAreaId = areaId;
|
||||
|
||||
@@ -4921,11 +4921,10 @@ void Player::SetHomebind(WorldLocation const& loc, uint32 areaId)
|
||||
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_PLAYER_HOMEBIND);
|
||||
stmt->SetData(0, m_homebindMapId);
|
||||
stmt->SetData(1, m_homebindAreaId);
|
||||
stmt->SetData(2, m_homebindX);
|
||||
stmt->SetData(3, m_homebindY);
|
||||
stmt->SetData(4, m_homebindZ);
|
||||
stmt->SetData(5, m_homebindO);
|
||||
stmt->SetData(6, GetGUID().GetCounter());
|
||||
stmt->SetData (2, m_homebindX);
|
||||
stmt->SetData (3, m_homebindY);
|
||||
stmt->SetData (4, m_homebindZ);
|
||||
stmt->SetData(5, GetGUID().GetCounter());
|
||||
CharacterDatabase.Execute(stmt);
|
||||
}
|
||||
|
||||
@@ -4981,8 +4980,7 @@ bool Player::LoadFromDB(ObjectGuid playerGuid, CharacterDatabaseQueryHolder cons
|
||||
m_name = fields[2].Get<std::string>();
|
||||
|
||||
// check name limitations
|
||||
if (ObjectMgr::CheckPlayerName(m_name) != CHAR_NAME_SUCCESS ||
|
||||
(AccountMgr::IsPlayerAccount(GetSession()->GetSecurity()) && (sObjectMgr->IsReservedName(m_name) || sObjectMgr->IsProfanityName(m_name))))
|
||||
if (ObjectMgr::CheckPlayerName(m_name) != CHAR_NAME_SUCCESS || AccountMgr::IsPlayerAccount(GetSession()->GetSecurity()))
|
||||
{
|
||||
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG);
|
||||
stmt->SetData(0, uint16(AT_LOGIN_RENAME));
|
||||
@@ -5099,7 +5097,7 @@ bool Player::LoadFromDB(ObjectGuid playerGuid, CharacterDatabaseQueryHolder cons
|
||||
|
||||
std::string taxi_nodes = fields[42].Get<std::string>();
|
||||
|
||||
auto RelocateToHomebind = [this, &mapId, &instanceId]() { mapId = m_homebindMapId; instanceId = 0; Relocate(m_homebindX, m_homebindY, m_homebindZ, m_homebindO); };
|
||||
auto RelocateToHomebind = [this, &mapId, &instanceId]() { mapId = m_homebindMapId; instanceId = 0; Relocate(m_homebindX, m_homebindY, m_homebindZ); };
|
||||
|
||||
_LoadGroup();
|
||||
|
||||
@@ -7014,7 +7012,7 @@ bool Player::_LoadHomeBind(PreparedQueryResult result)
|
||||
}
|
||||
|
||||
bool ok = false;
|
||||
// SELECT mapId, zoneId, posX, posY, posZ, pozO FROM character_homebind WHERE guid = ?
|
||||
// SELECT mapId, zoneId, posX, posY, posZ FROM character_homebind WHERE guid = ?
|
||||
if (result)
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
@@ -7024,12 +7022,11 @@ bool Player::_LoadHomeBind(PreparedQueryResult result)
|
||||
m_homebindX = fields[2].Get<float>();
|
||||
m_homebindY = fields[3].Get<float>();
|
||||
m_homebindZ = fields[4].Get<float>();
|
||||
m_homebindO = fields[5].Get<float>();
|
||||
|
||||
MapEntry const* bindMapEntry = sMapStore.LookupEntry(m_homebindMapId);
|
||||
|
||||
// accept saved data only for valid position (and non instanceable), and accessable
|
||||
if (MapMgr::IsValidMapCoord(m_homebindMapId, m_homebindX, m_homebindY, m_homebindZ, m_homebindO) &&
|
||||
if (MapMgr::IsValidMapCoord(m_homebindMapId, m_homebindX, m_homebindY, m_homebindZ) &&
|
||||
!bindMapEntry->Instanceable() && GetSession()->Expansion() >= bindMapEntry->Expansion())
|
||||
ok = true;
|
||||
else
|
||||
@@ -7047,20 +7044,19 @@ bool Player::_LoadHomeBind(PreparedQueryResult result)
|
||||
m_homebindX = info->positionX;
|
||||
m_homebindY = info->positionY;
|
||||
m_homebindZ = info->positionZ;
|
||||
m_homebindO = info->orientation;
|
||||
|
||||
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_PLAYER_HOMEBIND);
|
||||
stmt->SetData(0, GetGUID().GetCounter());
|
||||
stmt->SetData(1, m_homebindMapId);
|
||||
stmt->SetData(2, m_homebindAreaId);
|
||||
stmt->SetData(3, m_homebindX);
|
||||
stmt->SetData(4, m_homebindY);
|
||||
stmt->SetData(5, m_homebindZ);
|
||||
stmt->SetData(6, m_homebindO);
|
||||
stmt->SetData (3, m_homebindX);
|
||||
stmt->SetData (4, m_homebindY);
|
||||
stmt->SetData (5, m_homebindZ);
|
||||
CharacterDatabase.Execute(stmt);
|
||||
}
|
||||
|
||||
LOG_DEBUG("entities.player", "Setting player home position - mapid: {}, areaid: {}, X: {}, Y: {}, Z: {}, O: {}",
|
||||
m_homebindMapId, m_homebindAreaId, m_homebindX, m_homebindY, m_homebindZ, m_homebindO);
|
||||
LOG_DEBUG("entities.player", "Setting player home position - mapid: {}, areaid: {}, X: {}, Y: {}, Z: {}",
|
||||
m_homebindMapId, m_homebindAreaId, m_homebindX, m_homebindY, m_homebindZ);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1017,7 +1017,7 @@ void Player::UpdateCombatSkills(Unit* victim, WeaponAttackType attType, bool def
|
||||
|
||||
chance = chance < 1.0f ? 1.0f : chance; // minimum chance to increase skill is 1%
|
||||
|
||||
LOG_DEBUG("entities.player", "Player::UpdateCombatSkills(defence:{}, playerLevel:{}, moblevel:{}) -> ({}/{}) chance to increase skill is {}%", defence, playerLevel, moblevel, currentSkillValue, currentSkillMax, chance);
|
||||
LOG_DEBUG("entities.player", "Player::UpdateCombatSkills(defence:{}, playerLevel:{}, moblevel:{}) -> ({}/{}) chance to increase skill is {}\%", defence, playerLevel, moblevel, currentSkillValue, currentSkillMax, chance);
|
||||
|
||||
if (roll_chance_f(chance))
|
||||
{
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
#include "LFGMgr.h"
|
||||
#include "Log.h"
|
||||
#include "MapMgr.h"
|
||||
#include <numeric>
|
||||
#include "Pet.h"
|
||||
#include "PoolMgr.h"
|
||||
#include "ReputationMgr.h"
|
||||
@@ -53,6 +52,7 @@
|
||||
#include "Vehicle.h"
|
||||
#include "World.h"
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <numeric>
|
||||
|
||||
ScriptMapMap sSpellScripts;
|
||||
ScriptMapMap sEventScripts;
|
||||
@@ -203,62 +203,6 @@ std::string ScriptInfo::GetDebugInfo() const
|
||||
return std::string(sz);
|
||||
}
|
||||
|
||||
/**
|
||||
* @name ReservedNames
|
||||
* @brief Checks NamesReserved.dbc for reserved names
|
||||
*
|
||||
* @param name Name to check for match in NamesReserved.dbc
|
||||
* @return true/false
|
||||
*/
|
||||
bool ReservedNames(std::wstring& name)
|
||||
{
|
||||
for (NamesReservedEntry const* reservedStore : sNamesReservedStore)
|
||||
{
|
||||
std::wstring PatternString;
|
||||
|
||||
Utf8toWStr(reservedStore->Pattern, PatternString);
|
||||
|
||||
boost::algorithm::replace_all(PatternString, "\\<", "");
|
||||
boost::algorithm::replace_all(PatternString, "\\>", "");
|
||||
|
||||
int stringCompare = name.compare(PatternString);
|
||||
if (stringCompare == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
* @name ProfanityNames
|
||||
* @brief Checks NamesProfanity.dbc for reserved names
|
||||
*
|
||||
* @param name Name to check for match in NamesProfanity.dbc
|
||||
* @return true/false
|
||||
*/
|
||||
bool ProfanityNames(std::wstring& name)
|
||||
{
|
||||
for (NamesProfanityEntry const* profanityStore : sNamesProfanityStore)
|
||||
{
|
||||
std::wstring PatternString;
|
||||
|
||||
Utf8toWStr(profanityStore->Pattern, PatternString);
|
||||
|
||||
boost::algorithm::replace_all(PatternString, "\\<", "");
|
||||
boost::algorithm::replace_all(PatternString, "\\>", "");
|
||||
|
||||
int stringCompare = name.compare(PatternString);
|
||||
if (stringCompare == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool normalizePlayerName(std::string& name)
|
||||
{
|
||||
if (name.empty())
|
||||
@@ -8141,7 +8085,7 @@ void ObjectMgr::LoadCreatureQuestEnders()
|
||||
}
|
||||
}
|
||||
|
||||
void ObjectMgr::LoadReservedPlayersNames()
|
||||
void ObjectMgr::LoadReservedPlayerNamesDB()
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
@@ -8151,8 +8095,7 @@ void ObjectMgr::LoadReservedPlayersNames()
|
||||
|
||||
if (!result)
|
||||
{
|
||||
LOG_WARN("server.loading", ">> Loaded 0 reserved player names. DB table `reserved_name` is empty!");
|
||||
LOG_INFO("server.loading", " ");
|
||||
LOG_WARN("server.loading", ">> Loaded 0 reserved names. DB table `reserved_name` is empty!");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -8177,7 +8120,36 @@ void ObjectMgr::LoadReservedPlayersNames()
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
|
||||
LOG_INFO("server.loading", ">> Loaded {} reserved player names in {} ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", ">> Loaded {} reserved names from DB in {} ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
}
|
||||
|
||||
void ObjectMgr::LoadReservedPlayerNamesDBC()
|
||||
{
|
||||
if (!sWorld->getBoolConfig(CONFIG_STRICT_NAMES_RESERVED))
|
||||
{
|
||||
LOG_WARN("server.loading", ">> Loaded 0 reserved names from DBC. Config option disabled.");
|
||||
return;
|
||||
}
|
||||
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
uint32 count = 0;
|
||||
|
||||
for (NamesReservedEntry const* reservedStore : sNamesReservedStore)
|
||||
{
|
||||
std::wstring wstr;
|
||||
|
||||
Utf8toWStr(reservedStore->Pattern, wstr);
|
||||
|
||||
// DBC does not have clean entries, remove the junk.
|
||||
boost::algorithm::replace_all(wstr, "\\<", "");
|
||||
boost::algorithm::replace_all(wstr, "\\>", "");
|
||||
|
||||
_reservedNamesStore.insert(wstr);
|
||||
count++;
|
||||
}
|
||||
|
||||
LOG_INFO("server.loading", ">> Loaded {} reserved names from DBC in {} ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", " ");
|
||||
}
|
||||
|
||||
@@ -8216,7 +8188,7 @@ void ObjectMgr::AddReservedPlayerName(std::string const& name)
|
||||
}
|
||||
}
|
||||
|
||||
void ObjectMgr::LoadProfanityPlayersNames()
|
||||
void ObjectMgr::LoadProfanityNamesFromDB()
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
@@ -8226,8 +8198,7 @@ void ObjectMgr::LoadProfanityPlayersNames()
|
||||
|
||||
if (!result)
|
||||
{
|
||||
LOG_WARN("server.loading", ">> Loaded 0 profanity player names. DB table `profanity_name` is empty!");
|
||||
LOG_INFO("server.loading", " ");
|
||||
LOG_WARN("server.loading", ">> Loaded 0 profanity names. DB table `profanity_name` is empty!");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -8252,7 +8223,36 @@ void ObjectMgr::LoadProfanityPlayersNames()
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
|
||||
LOG_INFO("server.loading", ">> Loaded {} profanity player names in {} ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", ">> Loaded {} profanity names from DB in {} ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
}
|
||||
|
||||
void ObjectMgr::LoadProfanityNamesFromDBC()
|
||||
{
|
||||
if (!sWorld->getBoolConfig(CONFIG_STRICT_NAMES_PROFANITY))
|
||||
{
|
||||
LOG_WARN("server.loading", ">> Loaded 0 profanity names from DBC. Config option disabled.");
|
||||
return;
|
||||
}
|
||||
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
uint32 count = 0;
|
||||
|
||||
for (NamesProfanityEntry const* profanityStore : sNamesProfanityStore)
|
||||
{
|
||||
std::wstring wstr;
|
||||
|
||||
Utf8toWStr(profanityStore->Pattern, wstr);
|
||||
|
||||
// DBC does not have clean entries, remove the junk.
|
||||
boost::algorithm::replace_all(wstr, "\\<", "");
|
||||
boost::algorithm::replace_all(wstr, "\\>", "");
|
||||
|
||||
_profanityNamesStore.insert(wstr);
|
||||
count++;
|
||||
}
|
||||
|
||||
LOG_INFO("server.loading", ">> Loaded {} profanity names from DBC in {} ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", " ");
|
||||
}
|
||||
|
||||
@@ -8392,34 +8392,13 @@ uint8 ObjectMgr::CheckPlayerName(std::string_view name, bool create)
|
||||
if (wname[i] == wname[i - 1] && wname[i] == wname[i - 2])
|
||||
return CHAR_NAME_THREE_CONSECUTIVE;
|
||||
|
||||
// Check Reserved Name from Database
|
||||
// Check Reserved Name
|
||||
if (sObjectMgr->IsReservedName(name))
|
||||
{
|
||||
return CHAR_NAME_RESERVED;
|
||||
}
|
||||
|
||||
// Check Profanity Name
|
||||
if (sObjectMgr->IsProfanityName(name))
|
||||
{
|
||||
return CHAR_NAME_PROFANE;
|
||||
}
|
||||
|
||||
// Check for Reserved Name from DBC
|
||||
if (sWorld->getBoolConfig(CONFIG_STRICT_NAMES_RESERVED))
|
||||
{
|
||||
if (ReservedNames(wname))
|
||||
{
|
||||
return CHAR_NAME_RESERVED;
|
||||
}
|
||||
}
|
||||
|
||||
// Check for Profanity
|
||||
if (sWorld->getBoolConfig(CONFIG_STRICT_NAMES_PROFANITY))
|
||||
{
|
||||
if (ProfanityNames(wname))
|
||||
{
|
||||
return CHAR_NAME_PROFANE;
|
||||
}
|
||||
}
|
||||
|
||||
return CHAR_NAME_SUCCESS;
|
||||
}
|
||||
@@ -8437,23 +8416,13 @@ bool ObjectMgr::IsValidCharterName(std::string_view name)
|
||||
if (wname.size() < minName)
|
||||
return false;
|
||||
|
||||
// Check for Reserved Name from DBC
|
||||
if (sWorld->getBoolConfig(CONFIG_STRICT_NAMES_RESERVED))
|
||||
{
|
||||
if (ReservedNames(wname))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// Check Reserved Name
|
||||
if (sObjectMgr->IsReservedName(name))
|
||||
return false;
|
||||
|
||||
// Check for Profanity
|
||||
if (sWorld->getBoolConfig(CONFIG_STRICT_NAMES_PROFANITY))
|
||||
{
|
||||
if (ProfanityNames(wname))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// Check Profanity Name
|
||||
if (sObjectMgr->IsProfanityName(name))
|
||||
return false;
|
||||
|
||||
uint32 strictMask = sWorld->getIntConfig(CONFIG_STRICT_CHARTER_NAMES);
|
||||
|
||||
@@ -8491,23 +8460,13 @@ PetNameInvalidReason ObjectMgr::CheckPetName(std::string_view name)
|
||||
if (!isValidString(wname, strictMask, false))
|
||||
return PET_NAME_MIXED_LANGUAGES;
|
||||
|
||||
// Check for Reserved Name from DBC
|
||||
if (sWorld->getBoolConfig(CONFIG_STRICT_NAMES_RESERVED))
|
||||
{
|
||||
if (ReservedNames(wname))
|
||||
{
|
||||
return PET_NAME_RESERVED;
|
||||
}
|
||||
}
|
||||
// Check Reserved Name
|
||||
if (sObjectMgr->IsReservedName(name))
|
||||
return PET_NAME_RESERVED;
|
||||
|
||||
// Check for Profanity
|
||||
if (sWorld->getBoolConfig(CONFIG_STRICT_NAMES_PROFANITY))
|
||||
{
|
||||
if (ProfanityNames(wname))
|
||||
{
|
||||
return PET_NAME_PROFANE;
|
||||
}
|
||||
}
|
||||
// Check Profanity Name
|
||||
if (sObjectMgr->IsProfanityName(name))
|
||||
return PET_NAME_PROFANE;
|
||||
|
||||
return PET_NAME_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -691,8 +691,6 @@ SkillRangeType GetSkillRangeType(SkillRaceClassInfoEntry const* rcEntry);
|
||||
#define MAX_CHARTER_NAME 24 // max allowed by client name length
|
||||
#define MAX_CHANNEL_NAME 50 // pussywizard
|
||||
|
||||
bool ReservedNames(std::wstring& name);
|
||||
bool ProfanityNames(std::wstring& name);
|
||||
bool normalizePlayerName(std::string& name);
|
||||
|
||||
struct LanguageDesc
|
||||
@@ -1335,12 +1333,14 @@ public:
|
||||
uint32 AddCreData(uint32 entry, uint32 map, float x, float y, float z, float o, uint32 spawntimedelay = 0);
|
||||
|
||||
// reserved names
|
||||
void LoadReservedPlayersNames();
|
||||
void LoadReservedPlayerNamesDB();
|
||||
void LoadReservedPlayerNamesDBC();
|
||||
[[nodiscard]] bool IsReservedName(std::string_view name) const;
|
||||
void AddReservedPlayerName(std::string const& name);
|
||||
|
||||
// profanity names
|
||||
void LoadProfanityPlayersNames();
|
||||
void LoadProfanityNamesFromDB();
|
||||
void LoadProfanityNamesFromDBC();
|
||||
[[nodiscard]] bool IsProfanityName(std::string_view name) const;
|
||||
void AddProfanityPlayerName(std::string const& name);
|
||||
|
||||
@@ -1509,7 +1509,7 @@ private:
|
||||
|
||||
//character profanity names
|
||||
typedef std::set<std::wstring> ProfanityNamesContainer;
|
||||
ReservedNamesContainer _profanityNamesStore;
|
||||
ProfanityNamesContainer _profanityNamesStore;
|
||||
|
||||
GameTeleContainer _gameTeleStore;
|
||||
|
||||
|
||||
@@ -1187,7 +1187,7 @@ void Guild::OnPlayerStatusChange(Player* player, uint32 flag, bool state)
|
||||
|
||||
bool Guild::SetName(std::string_view const& name)
|
||||
{
|
||||
if (m_name == name || name.empty() || name.length() > 24 || sObjectMgr->IsReservedName(name) || sObjectMgr->IsProfanityName(name) || !ObjectMgr::IsValidCharterName(name))
|
||||
if (m_name == name || name.empty() || name.length() > 24 || !ObjectMgr::IsValidCharterName(name))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -888,7 +888,7 @@ void WorldSession::HandlePlayerLoginFromDB(LoginQueryHolder const& holder)
|
||||
if (at)
|
||||
pCurrChar->TeleportTo(at->target_mapId, at->target_X, at->target_Y, at->target_Z, pCurrChar->GetOrientation());
|
||||
else
|
||||
pCurrChar->TeleportTo(pCurrChar->m_homebindMapId, pCurrChar->m_homebindX, pCurrChar->m_homebindY, pCurrChar->m_homebindZ, pCurrChar->m_homebindO);
|
||||
pCurrChar->TeleportTo(pCurrChar->m_homebindMapId, pCurrChar->m_homebindX, pCurrChar->m_homebindY, pCurrChar->m_homebindZ, pCurrChar->GetOrientation());
|
||||
}
|
||||
|
||||
pCurrChar->SendInitialPacketsAfterAddToMap();
|
||||
@@ -2322,7 +2322,6 @@ void WorldSession::HandleCharFactionOrRaceChangeCallback(std::shared_ptr<Charact
|
||||
stmt->SetData(3, loc.GetPositionX());
|
||||
stmt->SetData(4, loc.GetPositionY());
|
||||
stmt->SetData(5, loc.GetPositionZ());
|
||||
stmt->SetData(6, loc.GetOrientation());
|
||||
trans->Append(stmt);
|
||||
|
||||
Player::SavePositionInDB(loc, zoneId, factionChangeInfo->Guid, trans);
|
||||
|
||||
@@ -1720,7 +1720,7 @@ void WorldSession::HandleHearthAndResurrect(WorldPacket& /*recv_data*/)
|
||||
_player->BuildPlayerRepop();
|
||||
_player->ResurrectPlayer(1.0f);
|
||||
_player->SpawnCorpseBones();
|
||||
_player->TeleportTo(_player->m_homebindMapId, _player->m_homebindX, _player->m_homebindY, _player->m_homebindZ, _player->m_homebindO);
|
||||
_player->TeleportTo(_player->m_homebindMapId, _player->m_homebindX, _player->m_homebindY, _player->m_homebindZ, _player->GetOrientation());
|
||||
}
|
||||
|
||||
void WorldSession::HandleInstanceLockResponse(WorldPacket& recvPacket)
|
||||
|
||||
@@ -92,7 +92,7 @@ void WorldSession::HandleMoveWorldportAck()
|
||||
if (!newMap || newMap->CannotEnter(GetPlayer(), false))
|
||||
{
|
||||
LOG_ERROR("network.opcode", "Map {} could not be created for player {}, porting player to homebind", loc.GetMapId(), GetPlayer()->GetGUID().ToString());
|
||||
GetPlayer()->TeleportTo(GetPlayer()->m_homebindMapId, GetPlayer()->m_homebindX, GetPlayer()->m_homebindY, GetPlayer()->m_homebindZ, GetPlayer()->m_homebindO);
|
||||
GetPlayer()->TeleportTo(GetPlayer()->m_homebindMapId, GetPlayer()->m_homebindX, GetPlayer()->m_homebindY, GetPlayer()->m_homebindZ, GetPlayer()->GetOrientation());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ void WorldSession::HandleMoveWorldportAck()
|
||||
GetPlayer()->GetName(), GetPlayer()->GetGUID().ToString(), loc.GetMapId());
|
||||
GetPlayer()->ResetMap();
|
||||
GetPlayer()->SetMap(oldMap);
|
||||
GetPlayer()->TeleportTo(GetPlayer()->m_homebindMapId, GetPlayer()->m_homebindX, GetPlayer()->m_homebindY, GetPlayer()->m_homebindZ, GetPlayer()->m_homebindO);
|
||||
GetPlayer()->TeleportTo(GetPlayer()->m_homebindMapId, GetPlayer()->m_homebindX, GetPlayer()->m_homebindY, GetPlayer()->m_homebindZ, GetPlayer()->GetOrientation());
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -856,18 +856,6 @@ void WorldSession::HandlePetRename(WorldPacket& recvData)
|
||||
return;
|
||||
}
|
||||
|
||||
if (sObjectMgr->IsReservedName(name))
|
||||
{
|
||||
SendPetNameInvalid(PET_NAME_RESERVED, name, nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
if (sObjectMgr->IsProfanityName(name))
|
||||
{
|
||||
SendPetNameInvalid(PET_NAME_PROFANE, name, nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
pet->SetName(name);
|
||||
|
||||
Unit* owner = pet->GetOwner();
|
||||
|
||||
@@ -136,7 +136,7 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket& recvData)
|
||||
return;
|
||||
}
|
||||
|
||||
if (sObjectMgr->IsReservedName(name) || sObjectMgr->IsProfanityName(name) || !ObjectMgr::IsValidCharterName(name))
|
||||
if (!ObjectMgr::IsValidCharterName(name))
|
||||
{
|
||||
Guild::SendCommandResult(this, GUILD_COMMAND_CREATE, ERR_GUILD_NAME_INVALID, name);
|
||||
return;
|
||||
@@ -149,7 +149,7 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket& recvData)
|
||||
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, name, "", ERR_ARENA_TEAM_NAME_EXISTS_S);
|
||||
return;
|
||||
}
|
||||
if (sObjectMgr->IsReservedName(name) || sObjectMgr->IsProfanityName(name) || !ObjectMgr::IsValidCharterName(name))
|
||||
if (!ObjectMgr::IsValidCharterName(name))
|
||||
{
|
||||
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, name, "", ERR_ARENA_TEAM_NAME_INVALID);
|
||||
return;
|
||||
@@ -350,7 +350,7 @@ void WorldSession::HandlePetitionRenameOpcode(WorldPacket& recvData)
|
||||
Guild::SendCommandResult(this, GUILD_COMMAND_CREATE, ERR_GUILD_NAME_EXISTS_S, newName);
|
||||
return;
|
||||
}
|
||||
if (sObjectMgr->IsReservedName(newName) || sObjectMgr->IsProfanityName(newName) || !ObjectMgr::IsValidCharterName(newName))
|
||||
if (!ObjectMgr::IsValidCharterName(newName))
|
||||
{
|
||||
Guild::SendCommandResult(this, GUILD_COMMAND_CREATE, ERR_GUILD_NAME_INVALID, newName);
|
||||
return;
|
||||
@@ -363,7 +363,7 @@ void WorldSession::HandlePetitionRenameOpcode(WorldPacket& recvData)
|
||||
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, newName, "", ERR_ARENA_TEAM_NAME_EXISTS_S);
|
||||
return;
|
||||
}
|
||||
if (sObjectMgr->IsReservedName(newName) || sObjectMgr->IsProfanityName(newName) || !ObjectMgr::IsValidCharterName(newName))
|
||||
if (!ObjectMgr::IsValidCharterName(newName))
|
||||
{
|
||||
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, newName, "", ERR_ARENA_TEAM_NAME_INVALID);
|
||||
return;
|
||||
|
||||
@@ -1266,7 +1266,7 @@ void Map::RemoveAllPlayers()
|
||||
{
|
||||
// this is happening for bg
|
||||
LOG_ERROR("maps", "Map::UnloadAll: player {} is still in map {} during unload, this should not happen!", player->GetName(), GetId());
|
||||
player->TeleportTo(player->m_homebindMapId, player->m_homebindX, player->m_homebindY, player->m_homebindZ, player->m_homebindO);
|
||||
player->TeleportTo(player->m_homebindMapId, player->m_homebindX, player->m_homebindY, player->m_homebindZ, player->GetOrientation());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -655,12 +655,12 @@ enum AcoreStrings
|
||||
LANG_GMLIST_HEADER = 598,
|
||||
LANG_GMLIST_EMPTY = 599,
|
||||
|
||||
// End Level 3 list, continued at 1100
|
||||
|
||||
LANG_EVENT_STARTED = 600,
|
||||
LANG_EVENT_STOPPED = 601,
|
||||
|
||||
// 602-704 - free
|
||||
LANG_REWARDED = 602,
|
||||
|
||||
// 603-704 - free
|
||||
|
||||
LANG_WAIT_BEFORE_SPEAKING = 705,
|
||||
LANG_NOT_EQUIPPED_ITEM = 706,
|
||||
@@ -844,6 +844,7 @@ enum AcoreStrings
|
||||
LANG_ACCESS_REQUIREMENT_LEADER_COMPLETE_QUESTS = 889,
|
||||
LANG_ACCESS_REQUIREMENT_LEADER_COMPLETE_ACHIEVEMENTS = 890,
|
||||
LANG_ACCESS_REQUIREMENT_LEADER_OBTAIN_ITEMS = 891,
|
||||
// End Level 3 list, continued at 1100
|
||||
|
||||
// Level 4 (CLI only commands)
|
||||
LANG_COMMAND_EXIT = 1000,
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "AllScriptsObjects.h"
|
||||
#include "LFGScripts.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "LFGScripts.h"
|
||||
#include "ScriptObject.h"
|
||||
#include "ScriptSystem.h"
|
||||
#include "SmartAI.h"
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
#include "ScriptMgr.h"
|
||||
#include "World.h"
|
||||
#include "WorldSession.h"
|
||||
#include <memory>
|
||||
#include "zlib.h"
|
||||
#include <memory>
|
||||
|
||||
using boost::asio::ip::tcp;
|
||||
|
||||
|
||||
@@ -1349,7 +1349,7 @@ void Spell::SelectImplicitCasterDestTargets(SpellEffIndex effIndex, SpellImplici
|
||||
break;
|
||||
case TARGET_DEST_HOME:
|
||||
if (Player* playerCaster = m_caster->ToPlayer())
|
||||
dest = SpellDestination(playerCaster->m_homebindX, playerCaster->m_homebindY, playerCaster->m_homebindZ, playerCaster->m_homebindO, playerCaster->m_homebindMapId);
|
||||
dest = SpellDestination(playerCaster->m_homebindX, playerCaster->m_homebindY, playerCaster->m_homebindZ, playerCaster->GetOrientation(), playerCaster->m_homebindMapId);
|
||||
break;
|
||||
case TARGET_DEST_DB:
|
||||
if (SpellTargetPosition const* st = sSpellMgr->GetSpellTargetPosition(m_spellInfo->Id, effIndex))
|
||||
@@ -3181,6 +3181,8 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit* unit, uint32 effectMask, bool scaleA
|
||||
if (diminishMod == 0.0f)
|
||||
{
|
||||
m_spellAura->Remove();
|
||||
if (m_diminishGroup == DIMINISHING_TAUNT)
|
||||
return SPELL_MISS_IMMUNE;
|
||||
bool found = false;
|
||||
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
if (effectMask & (1 << i) && m_spellInfo->Effects[i].Effect != SPELL_EFFECT_APPLY_AURA)
|
||||
|
||||
@@ -384,12 +384,9 @@ void SpellMgr::LoadSpellInfoCorrections()
|
||||
27892, // To Anchor 1
|
||||
27928, // To Anchor 1
|
||||
27935, // To Anchor 1
|
||||
27915, // Anchor to Skulls
|
||||
27931, // Anchor to Skulls
|
||||
27937 // Anchor to Skulls
|
||||
}, [](SpellInfo* spellInfo)
|
||||
}, [](SpellInfo* spellInfo)
|
||||
{
|
||||
spellInfo->RangeEntry = sSpellRangeStore.LookupEntry(13);
|
||||
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_10_YARDS);
|
||||
});
|
||||
|
||||
// Wrath of the Plaguebringer
|
||||
|
||||
@@ -1917,10 +1917,12 @@ void World::SetInitialWorldSettings()
|
||||
sGroupMgr->LoadGroups();
|
||||
|
||||
LOG_INFO("server.loading", "Loading Reserved Names...");
|
||||
sObjectMgr->LoadReservedPlayersNames();
|
||||
sObjectMgr->LoadReservedPlayerNamesDB();
|
||||
sObjectMgr->LoadReservedPlayerNamesDBC(); // Needs to be after LoadReservedPlayerNamesDB()
|
||||
|
||||
LOG_INFO("server.loading", "Loading Profanity Names...");
|
||||
sObjectMgr->LoadProfanityPlayersNames();
|
||||
sObjectMgr->LoadProfanityNamesFromDB();
|
||||
sObjectMgr->LoadProfanityNamesFromDBC(); // Needs to be after LoadProfanityNamesFromDB()
|
||||
|
||||
LOG_INFO("server.loading", "Loading GameObjects for Quests...");
|
||||
sObjectMgr->LoadGameObjectForQuests();
|
||||
|
||||
@@ -347,21 +347,22 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
if (ObjectMgr::CheckPlayerName(newName, true) != CHAR_NAME_SUCCESS)
|
||||
ResponseCodes res = ResponseCodes(ObjectMgr::CheckPlayerName(newName, true));
|
||||
if (res != CHAR_NAME_SUCCESS)
|
||||
{
|
||||
handler->SendErrorMessage(LANG_BAD_VALUE);
|
||||
return false;
|
||||
}
|
||||
switch (res)
|
||||
{
|
||||
case CHAR_NAME_RESERVED:
|
||||
handler->SendErrorMessage(LANG_RESERVED_NAME);
|
||||
break;
|
||||
case CHAR_NAME_PROFANE:
|
||||
handler->SendErrorMessage(LANG_PROFANITY_NAME);
|
||||
break;
|
||||
default:
|
||||
handler->SendErrorMessage(LANG_BAD_VALUE);
|
||||
break;
|
||||
}
|
||||
|
||||
if (sObjectMgr->IsReservedName(newName))
|
||||
{
|
||||
handler->SendErrorMessage(LANG_RESERVED_NAME);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (sObjectMgr->IsProfanityName(newName))
|
||||
{
|
||||
handler->SendErrorMessage(LANG_PROFANITY_NAME);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
if (sObjectMgr->IsReservedName(guildName) || sObjectMgr->IsProfanityName(guildName) || !sObjectMgr->IsValidCharterName(guildName))
|
||||
if (!sObjectMgr->IsValidCharterName(guildName))
|
||||
{
|
||||
handler->SendErrorMessage(LANG_BAD_VALUE);
|
||||
return false;
|
||||
|
||||
@@ -31,9 +31,9 @@ EndScriptData */
|
||||
#include "ObjectMgr.h"
|
||||
#include "Player.h"
|
||||
#include "ReputationMgr.h"
|
||||
#include "SharedDefines.h"
|
||||
#include "SpellInfo.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "SharedDefines.h"
|
||||
|
||||
using namespace Acore::ChatCommands;
|
||||
|
||||
@@ -812,13 +812,13 @@ public:
|
||||
switch (status)
|
||||
{
|
||||
case QUEST_STATUS_COMPLETE:
|
||||
statusStr = handler->GetAcoreString(LANG_COMMAND_QUEST_COMPLETE);
|
||||
statusStr = handler->GetAcoreString(LANG_COMPLETE);
|
||||
break;
|
||||
case QUEST_STATUS_INCOMPLETE:
|
||||
statusStr = handler->GetAcoreString(LANG_COMMAND_QUEST_ACTIVE);
|
||||
statusStr = handler->GetAcoreString(LANG_ACTIVE);
|
||||
break;
|
||||
case QUEST_STATUS_REWARDED:
|
||||
statusStr = handler->GetAcoreString(LANG_COMMAND_QUEST_REWARDED);
|
||||
statusStr = handler->GetAcoreString(LANG_REWARDED);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -868,13 +868,13 @@ public:
|
||||
switch (status)
|
||||
{
|
||||
case QUEST_STATUS_COMPLETE:
|
||||
statusStr = handler->GetAcoreString(LANG_COMMAND_QUEST_COMPLETE);
|
||||
statusStr = handler->GetAcoreString(LANG_COMPLETE);
|
||||
break;
|
||||
case QUEST_STATUS_INCOMPLETE:
|
||||
statusStr = handler->GetAcoreString(LANG_COMMAND_QUEST_ACTIVE);
|
||||
statusStr = handler->GetAcoreString(LANG_ACTIVE);
|
||||
break;
|
||||
case QUEST_STATUS_REWARDED:
|
||||
statusStr = handler->GetAcoreString(LANG_COMMAND_QUEST_REWARDED);
|
||||
statusStr = handler->GetAcoreString(LANG_REWARDED);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -1428,7 +1428,7 @@ public:
|
||||
|
||||
if (location->empty() || *location == "inn")
|
||||
{
|
||||
player->TeleportTo(player->m_homebindMapId, player->m_homebindX, player->m_homebindY, player->m_homebindZ, player->m_homebindO);
|
||||
player->TeleportTo(player->m_homebindMapId, player->m_homebindX, player->m_homebindY, player->m_homebindZ, player->GetOrientation());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -687,10 +687,11 @@ public:
|
||||
ObjectGuid::LowType guid = fields[0].Get<uint32>();
|
||||
uint32 entry = fields[1].Get<uint32>();
|
||||
//uint32 entry2 = fields[2].Get<uint32>();
|
||||
float x = fields[3].Get<float>();
|
||||
float y = fields[4].Get<float>();
|
||||
float z = fields[5].Get<float>();
|
||||
uint16 mapId = fields[6].Get<uint16>();
|
||||
//uint32 entry3 = fields[3].Get<uint32>();
|
||||
float x = fields[4].Get<float>();
|
||||
float y = fields[5].Get<float>();
|
||||
float z = fields[6].Get<float>();
|
||||
uint16 mapId = fields[7].Get<uint16>();
|
||||
|
||||
CreatureTemplate const* creatureTemplate = sObjectMgr->GetCreatureTemplate(entry);
|
||||
if (!creatureTemplate)
|
||||
|
||||
@@ -780,17 +780,19 @@ public:
|
||||
|
||||
static bool HandleReloadReservedNameCommand(ChatHandler* handler)
|
||||
{
|
||||
LOG_INFO("server.loading", "Re-Loading `reserved_player` Table!");
|
||||
sObjectMgr->LoadReservedPlayersNames();
|
||||
handler->SendGlobalGMSysMessage("DB table `reserved_name` reloaded.");
|
||||
LOG_INFO("server.loading", "Re-Loading Reserved Names!");
|
||||
sObjectMgr->LoadReservedPlayerNamesDB();
|
||||
sObjectMgr->LoadReservedPlayerNamesDBC(); // Needed because we clear the store in LoadReservedPlayerNamesDB()
|
||||
handler->SendGlobalGMSysMessage("Reserved Names reloaded.");
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleReloadProfanityNameCommand(ChatHandler* handler)
|
||||
{
|
||||
LOG_INFO("server.loading", "Re-Loading `profanity_player` Table!");
|
||||
sObjectMgr->LoadProfanityPlayersNames();
|
||||
handler->SendGlobalGMSysMessage("DB table `profanity_player` reloaded.");
|
||||
LOG_INFO("server.loading", "Re-Loading Profanity Names!");
|
||||
sObjectMgr->LoadProfanityNamesFromDB();
|
||||
sObjectMgr->LoadProfanityNamesFromDBC(); // Needed because we clear the store in LoadProfanityNamesFromDB()
|
||||
handler->SendGlobalGMSysMessage("Profanity Names reloaded.");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -176,7 +176,7 @@ public:
|
||||
if (where.index() == 1) // References target's homebind
|
||||
{
|
||||
if (Player* target = player->GetConnectedPlayer())
|
||||
target->TeleportTo(target->m_homebindMapId, target->m_homebindX, target->m_homebindY, target->m_homebindZ, target->m_homebindO);
|
||||
target->TeleportTo(target->m_homebindMapId, target->m_homebindX, target->m_homebindY, target->m_homebindZ, target->GetOrientation());
|
||||
else
|
||||
{
|
||||
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHAR_HOMEBIND);
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "molten_core.h"
|
||||
#include "CreatureScript.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "SpellScript.h"
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "TaskScheduler.h"
|
||||
#include "molten_core.h"
|
||||
|
||||
enum Texts
|
||||
{
|
||||
|
||||
@@ -17,10 +17,10 @@
|
||||
|
||||
#include "CreatureScript.h"
|
||||
#include "GameObjectScript.h"
|
||||
#include "PassiveAI.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "TaskScheduler.h"
|
||||
#include "PassiveAI.h"
|
||||
#include "karazhan.h"
|
||||
|
||||
enum Spells
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "karazhan.h"
|
||||
#include "AreaTriggerScript.h"
|
||||
#include "CreatureScript.h"
|
||||
#include "Player.h"
|
||||
@@ -25,7 +26,6 @@
|
||||
#include "SpellAuras.h"
|
||||
#include "SpellScript.h"
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "karazhan.h"
|
||||
/* ScriptData
|
||||
SDName: Karazhan
|
||||
SD%Complete: 100
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
#include "CreatureScript.h"
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "Group.h"
|
||||
#include "LFGMgr.h"
|
||||
#include "Player.h"
|
||||
@@ -26,7 +27,6 @@
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "TaskScheduler.h"
|
||||
#include "shadowfang_keep.h"
|
||||
#include "GridNotifiersImpl.h"
|
||||
|
||||
enum ApothecarySpells
|
||||
{
|
||||
|
||||
@@ -37,49 +37,38 @@ enum DeathlyUsher
|
||||
SPELL_TELEPORT_GROUP = 27686
|
||||
};
|
||||
|
||||
class spell_razelikh_teleport_group : public SpellScriptLoader
|
||||
class spell_razelikh_teleport_group : public SpellScript
|
||||
{
|
||||
public:
|
||||
spell_razelikh_teleport_group() : SpellScriptLoader("spell_razelikh_teleport_group") { }
|
||||
PrepareSpellScript(spell_razelikh_teleport_group);
|
||||
|
||||
class spell_razelikh_teleport_group_SpellScript : public SpellScript
|
||||
bool Validate(SpellInfo const* /*spell*/) override
|
||||
{
|
||||
PrepareSpellScript(spell_razelikh_teleport_group_SpellScript);
|
||||
return ValidateSpellInfo({ SPELL_TELEPORT_SINGLE, SPELL_TELEPORT_SINGLE_IN_GROUP });
|
||||
}
|
||||
|
||||
bool Validate(SpellInfo const* /*spell*/) override
|
||||
void HandleScriptEffect(SpellEffIndex /* effIndex */)
|
||||
{
|
||||
if (Player* player = GetHitPlayer())
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_TELEPORT_SINGLE, SPELL_TELEPORT_SINGLE_IN_GROUP });
|
||||
}
|
||||
|
||||
void HandleScriptEffect(SpellEffIndex /* effIndex */)
|
||||
{
|
||||
if (Player* player = GetHitPlayer())
|
||||
if (Group* group = player->GetGroup())
|
||||
{
|
||||
if (Group* group = player->GetGroup())
|
||||
{
|
||||
for (GroupReference* itr = group->GetFirstMember(); itr != nullptr; itr = itr->next())
|
||||
if (Player* member = itr->GetSource())
|
||||
if (member->IsWithinDistInMap(player, 20.0f) && !member->isDead())
|
||||
member->CastSpell(member, SPELL_TELEPORT_SINGLE_IN_GROUP, true);
|
||||
}
|
||||
else
|
||||
player->CastSpell(player, SPELL_TELEPORT_SINGLE, true);
|
||||
for (GroupReference* itr = group->GetFirstMember(); itr != nullptr; itr = itr->next())
|
||||
if (Player* member = itr->GetSource())
|
||||
if (member->IsWithinDistInMap(player, 20.0f) && !member->isDead())
|
||||
member->CastSpell(member, SPELL_TELEPORT_SINGLE_IN_GROUP, true);
|
||||
}
|
||||
else
|
||||
player->CastSpell(player, SPELL_TELEPORT_SINGLE, true);
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_razelikh_teleport_group_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const override
|
||||
void Register() override
|
||||
{
|
||||
return new spell_razelikh_teleport_group_SpellScript();
|
||||
OnEffectHitTarget += SpellEffectFn(spell_razelikh_teleport_group::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_blasted_lands()
|
||||
{
|
||||
new spell_razelikh_teleport_group();
|
||||
RegisterSpellScript(spell_razelikh_teleport_group);
|
||||
}
|
||||
|
||||
@@ -457,31 +457,20 @@ enum PurificationIds
|
||||
NPC_AURIC = 37765,
|
||||
};
|
||||
|
||||
class spell_bh_cleanse_quel_delar : public SpellScriptLoader
|
||||
class spell_bh_cleanse_quel_delar : public SpellScript
|
||||
{
|
||||
public:
|
||||
spell_bh_cleanse_quel_delar() : SpellScriptLoader("spell_bh_cleanse_quel_delar") { }
|
||||
PrepareSpellScript(spell_bh_cleanse_quel_delar);
|
||||
|
||||
class spell_bh_cleanse_quel_delar_SpellScript : public SpellScript
|
||||
void OnEffect(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
PrepareSpellScript(spell_bh_cleanse_quel_delar_SpellScript);
|
||||
if (Unit* caster = GetCaster())
|
||||
if (Creature* c = caster->FindNearestCreature(NPC_ROMMATH, 50.0f, true))
|
||||
c->AI()->DoAction(-1);
|
||||
}
|
||||
|
||||
void OnEffect(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
if (Creature* c = caster->FindNearestCreature(NPC_ROMMATH, 50.0f, true))
|
||||
c->AI()->DoAction(-1);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectLaunch += SpellEffectFn(spell_bh_cleanse_quel_delar_SpellScript::OnEffect, EFFECT_0, SPELL_EFFECT_SEND_EVENT);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const override
|
||||
void Register() override
|
||||
{
|
||||
return new spell_bh_cleanse_quel_delar_SpellScript();
|
||||
OnEffectLaunch += SpellEffectFn(spell_bh_cleanse_quel_delar::OnEffect, EFFECT_0, SPELL_EFFECT_SEND_EVENT);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -692,7 +681,7 @@ void AddSC_isle_of_queldanas()
|
||||
{
|
||||
// OUR:
|
||||
new npc_bh_thalorien_dawnseeker();
|
||||
new spell_bh_cleanse_quel_delar();
|
||||
RegisterSpellScript(spell_bh_cleanse_quel_delar);
|
||||
new npc_grand_magister_rommath();
|
||||
|
||||
// THEIR:
|
||||
|
||||
@@ -2223,36 +2223,25 @@ public:
|
||||
######*/
|
||||
|
||||
// - 61123 - Ingest
|
||||
class spell_blight_worm_ingest : public SpellScriptLoader
|
||||
class spell_blight_worm_ingest : public SpellScript
|
||||
{
|
||||
public:
|
||||
spell_blight_worm_ingest() : SpellScriptLoader("spell_blight_worm_ingest") { }
|
||||
PrepareSpellScript(spell_blight_worm_ingest);
|
||||
|
||||
class spell_blight_worm_ingest_SpellScript : public SpellScript
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
PrepareSpellScript(spell_blight_worm_ingest_SpellScript);
|
||||
return ValidateSpellInfo({ SPELL_INGEST });
|
||||
}
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_INGEST });
|
||||
}
|
||||
|
||||
void HandleScript(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (Unit* target = GetHitUnit())
|
||||
if (Unit* caster = GetCaster())
|
||||
target->CastSpell(caster, SPELL_INGEST_TRIGGER, true);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_blight_worm_ingest_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const override
|
||||
void HandleScript(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
return new spell_blight_worm_ingest_SpellScript();
|
||||
if (Unit* target = GetHitUnit())
|
||||
if (Unit* caster = GetCaster())
|
||||
target->CastSpell(caster, SPELL_INGEST_TRIGGER, true);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_blight_worm_ingest::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -4082,5 +4071,5 @@ void AddSC_undercity()
|
||||
new npc_jaina_proudmoore_bfu();
|
||||
new npc_lady_sylvanas_windrunner_bfu();
|
||||
new boss_blight_worm();
|
||||
new spell_blight_worm_ingest();
|
||||
RegisterSpellScript(spell_blight_worm_ingest);
|
||||
}
|
||||
|
||||
@@ -15,13 +15,13 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "hyjal.h"
|
||||
#include "CreatureScript.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptedGossip.h"
|
||||
#include "SpellScript.h"
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "hyjal.h"
|
||||
|
||||
enum Spells
|
||||
{
|
||||
|
||||
@@ -405,7 +405,22 @@ public:
|
||||
}
|
||||
|
||||
if (_bossWave != TO_BE_DECIDED)
|
||||
{
|
||||
DoUpdateWorldState(WORLD_STATE_WAVES, 0);
|
||||
scheduler.Schedule(30s, [this](TaskContext context)
|
||||
{
|
||||
if (IsEncounterInProgress())
|
||||
{
|
||||
// Reset the instance if its empty.
|
||||
// This is necessary because bosses get stuck fighting unreachable mobs.
|
||||
// Remove this when we are sure pathing no longer causes this.
|
||||
if (!instance->GetPlayersCountExceptGMs())
|
||||
SetData(DATA_RESET_ALLIANCE, 0);
|
||||
else
|
||||
context.Repeat();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
break;
|
||||
case DATA_SPAWN_INFERNALS:
|
||||
@@ -479,8 +494,6 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
// LOG_DEBUG("scripts", "Instance Hyjal: Instance data updated for event {} (Data={})", type, data);
|
||||
|
||||
if (data == DONE)
|
||||
{
|
||||
SaveToDB();
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "the_black_morass.h"
|
||||
#include "CreatureScript.h"
|
||||
#include "MoveSplineInit.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "SmartAI.h"
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "the_black_morass.h"
|
||||
|
||||
enum medivhMisc
|
||||
{
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ruins_of_ahnqiraj.h"
|
||||
#include "CreatureScript.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "SpellScript.h"
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "ruins_of_ahnqiraj.h"
|
||||
|
||||
enum Spells
|
||||
{
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "temple_of_ahnqiraj.h"
|
||||
#include "AreaTriggerScript.h"
|
||||
#include "CreatureScript.h"
|
||||
#include "MapReference.h"
|
||||
@@ -22,7 +23,6 @@
|
||||
#include "ScriptedCreature.h"
|
||||
#include "SpellScript.h"
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "temple_of_ahnqiraj.h"
|
||||
|
||||
enum Spells
|
||||
{
|
||||
|
||||
@@ -17,12 +17,12 @@
|
||||
|
||||
#include "CreatureScript.h"
|
||||
#include "GridNotifiers.h"
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "InstanceMapScript.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "TemporarySummon.h"
|
||||
#include "zulfarrak.h"
|
||||
#include "GridNotifiersImpl.h"
|
||||
|
||||
enum Misc
|
||||
{
|
||||
|
||||
@@ -15,13 +15,13 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "forge_of_souls.h"
|
||||
#include "CreatureScript.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptedGossip.h"
|
||||
#include "SpellScript.h"
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "forge_of_souls.h"
|
||||
|
||||
enum Yells
|
||||
{
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "halls_of_reflection.h"
|
||||
#include "AreaTriggerScript.h"
|
||||
#include "CreatureScript.h"
|
||||
#include "MotionMaster.h"
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "halls_of_reflection.h"
|
||||
|
||||
enum Events
|
||||
{
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "pit_of_saron.h"
|
||||
#include "AreaTriggerScript.h"
|
||||
#include "CreatureGroups.h"
|
||||
#include "CreatureScript.h"
|
||||
@@ -26,7 +27,6 @@
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "SpellScript.h"
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "pit_of_saron.h"
|
||||
|
||||
class npc_pos_leader : public CreatureScript
|
||||
{
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
#include "AchievementCriteriaScript.h"
|
||||
#include "Config.h"
|
||||
#include "CreatureScript.h"
|
||||
#include "CreatureTextMgr.h"
|
||||
#include "GameTime.h"
|
||||
@@ -585,7 +586,7 @@ public:
|
||||
_instance->SetBossState(DATA_ICECROWN_GUNSHIP_BATTLE, isVictory ? DONE : FAIL);
|
||||
me->GetMap()->SetZoneMusic(AREA_ICECROWN_CITADEL, 0);
|
||||
|
||||
if (Creature* creature = me->FindNearestCreature(me->GetEntry() == NPC_ORGRIMS_HAMMER ? NPC_THE_SKYBREAKER : NPC_ORGRIMS_HAMMER, 200.0f))
|
||||
if (Creature* creature = _instance->GetCreature(me->GetEntry() == NPC_ORGRIMS_HAMMER ? DATA_THE_SKYBREAKER : DATA_ORGRIMS_HAMMER))
|
||||
{
|
||||
_instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, creature);
|
||||
if (Aura* a = creature->GetAura(SPELL_CHECK_FOR_PLAYERS))
|
||||
@@ -646,7 +647,7 @@ public:
|
||||
|
||||
me->GetTransport()->ToMotionTransport()->EnableMovement(true);
|
||||
|
||||
if (Creature* ship = me->FindNearestCreature(_teamIdInInstance == TEAM_HORDE ? NPC_ORGRIMS_HAMMER : NPC_THE_SKYBREAKER, 200.0f))
|
||||
if (Creature* ship = _instance->GetCreature(_teamIdInInstance == TEAM_HORDE ? DATA_ORGRIMS_HAMMER : DATA_THE_SKYBREAKER))
|
||||
{
|
||||
ship->CastSpell(ship, SPELL_TELEPORT_PLAYERS_ON_VICTORY, true);
|
||||
ship->CastSpell(ship, SPELL_ACHIEVEMENT, true);
|
||||
@@ -675,6 +676,30 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 /*diff*/) override
|
||||
{
|
||||
if (!sConfigMgr->GetOption<int32>("WipeGunshipBlizzlike.Enable", 1))
|
||||
return;
|
||||
|
||||
if (_instance->GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) != IN_PROGRESS)
|
||||
return;
|
||||
|
||||
bool playerOnDeck = false;
|
||||
me->GetMap()->DoForAllPlayers([&](Player* player)
|
||||
{
|
||||
if (!player->GetVehicle() && player->IsAlive())
|
||||
playerOnDeck = true;
|
||||
});
|
||||
|
||||
// Wipe if no player is on the deck
|
||||
if (!playerOnDeck)
|
||||
{
|
||||
// Script runs on enemy ship. We want to kill our ship.
|
||||
if (Creature* ship = _instance->GetCreature(_teamIdInInstance == TEAM_HORDE ? DATA_ORGRIMS_HAMMER : DATA_THE_SKYBREAKER))
|
||||
Creature::Kill(me, ship);
|
||||
}
|
||||
}
|
||||
|
||||
void SetGUID(ObjectGuid guid, int32 id/* = 0*/) override
|
||||
{
|
||||
if (id != ACTION_SHIP_VISITS_ENEMY && id != ACTION_SHIP_VISITS_SELF)
|
||||
@@ -807,9 +832,9 @@ public:
|
||||
_events.ScheduleEvent(EVENT_INTRO_H_6, 11s);
|
||||
_events.ScheduleEvent(EVENT_KEEP_PLAYER_IN_COMBAT, 1ms);
|
||||
|
||||
if (Creature* skybreaker = me->FindNearestCreature(NPC_THE_SKYBREAKER, 200.0f))
|
||||
if (Creature* skybreaker = _instance->GetCreature(DATA_THE_SKYBREAKER))
|
||||
_instance->SendEncounterUnit(ENCOUNTER_FRAME_ENGAGE, skybreaker, 1);
|
||||
if (Creature* orgrimsHammer = me->FindNearestCreature(NPC_ORGRIMS_HAMMER, 200.0f))
|
||||
if (Creature* orgrimsHammer = _instance->GetCreature(DATA_ORGRIMS_HAMMER))
|
||||
{
|
||||
_instance->SendEncounterUnit(ENCOUNTER_FRAME_ENGAGE, orgrimsHammer, 2);
|
||||
orgrimsHammer->CastSpell(orgrimsHammer, SPELL_CHECK_FOR_PLAYERS, true);
|
||||
@@ -1143,9 +1168,9 @@ public:
|
||||
_events.ScheduleEvent(EVENT_INTRO_A_7, 11s);
|
||||
_events.ScheduleEvent(EVENT_KEEP_PLAYER_IN_COMBAT, 1ms);
|
||||
|
||||
if (Creature* orgrimsHammer = me->FindNearestCreature(NPC_ORGRIMS_HAMMER, 200.0f))
|
||||
if (Creature* orgrimsHammer = _instance->GetCreature(DATA_ORGRIMS_HAMMER))
|
||||
_instance->SendEncounterUnit(ENCOUNTER_FRAME_ENGAGE, orgrimsHammer, 1);
|
||||
if (Creature* skybreaker = me->FindNearestCreature(NPC_THE_SKYBREAKER, 200.0f))
|
||||
if (Creature* skybreaker = _instance->GetCreature(DATA_THE_SKYBREAKER))
|
||||
{
|
||||
_instance->SendEncounterUnit(ENCOUNTER_FRAME_ENGAGE, skybreaker, 2);
|
||||
skybreaker->CastSpell(skybreaker, SPELL_CHECK_FOR_PLAYERS, true);
|
||||
|
||||
@@ -20,12 +20,12 @@
|
||||
#include "CellImpl.h"
|
||||
#include "CreatureScript.h"
|
||||
#include "GridNotifiers.h"
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "icecrown_citadel.h"
|
||||
#include "GridNotifiersImpl.h"
|
||||
|
||||
enum Texts
|
||||
{
|
||||
|
||||
@@ -15,12 +15,14 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "icecrown_citadel.h"
|
||||
#include "AccountMgr.h"
|
||||
#include "AreaTriggerScript.h"
|
||||
#include "Cell.h"
|
||||
#include "CellImpl.h"
|
||||
#include "CreatureScript.h"
|
||||
#include "GridNotifiers.h"
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "Group.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "PassiveAI.h"
|
||||
@@ -29,8 +31,6 @@
|
||||
#include "SmartAI.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "icecrown_citadel.h"
|
||||
#include "GridNotifiersImpl.h"
|
||||
|
||||
enum Texts
|
||||
{
|
||||
|
||||
@@ -137,6 +137,8 @@ enum DataTypes
|
||||
DATA_ARTHAS_PLATFORM = 38,
|
||||
DATA_TERENAS_MENETHIL = 39,
|
||||
DATA_ENEMY_GUNSHIP = 40,
|
||||
DATA_THE_SKYBREAKER = 41,
|
||||
DATA_ORGRIMS_HAMMER = 42,
|
||||
|
||||
// pussywizard:
|
||||
DATA_BUFF_AVAILABLE = 251,
|
||||
|
||||
@@ -123,8 +123,10 @@ DoorData const doorData[] =
|
||||
|
||||
ObjectData const creatureData[] =
|
||||
{
|
||||
{ NPC_SINDRAGOSA, DATA_SINDRAGOSA },
|
||||
{ 0, 0 }
|
||||
{ NPC_SINDRAGOSA, DATA_SINDRAGOSA },
|
||||
{ NPC_THE_SKYBREAKER, DATA_THE_SKYBREAKER },
|
||||
{ NPC_ORGRIMS_HAMMER, DATA_ORGRIMS_HAMMER },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
// this doesnt have to only store questgivers, also can be used for related quest spawns
|
||||
|
||||
@@ -30,6 +30,7 @@ void AddSC_boss_gothik()
|
||||
{
|
||||
new boss_gothik();
|
||||
new npc_boss_gothik_minion();
|
||||
new npc_gothik_trigger();
|
||||
RegisterSpellScript(spell_gothik_shadow_bolt_volley);
|
||||
}
|
||||
|
||||
|
||||
@@ -34,15 +34,15 @@ enum Spells
|
||||
SPELL_TELEPORT_DEAD = 28025,
|
||||
SPELL_TELEPORT_LIVE = 28026,
|
||||
// Visual spells
|
||||
SPELL_INFORM_LIVING_TRAINEE = 27892,
|
||||
SPELL_INFORM_LIVING_KNIGHT = 27928,
|
||||
SPELL_INFORM_LIVING_RIDER = 27935,
|
||||
SPELL_INFORM_DEAD_TRAINEE = 27915,
|
||||
SPELL_INFORM_DEAD_KNIGHT = 27931,
|
||||
SPELL_INFORM_DEAD_RIDER = 27937,
|
||||
/*SPELL_ANCHOR_2_TRAINEE = 27893,
|
||||
SPELL_ANCHOR_1_TRAINEE = 27892,
|
||||
SPELL_ANCHOR_1_DK = 27928,
|
||||
SPELL_ANCHOR_1_RIDER = 27935,
|
||||
SPELL_ANCHOR_2_TRAINEE = 27893,
|
||||
SPELL_ANCHOR_2_DK = 27929,
|
||||
SPELL_ANCHOR_2_RIDER = 27936, fix me */
|
||||
SPELL_ANCHOR_2_RIDER = 27936,
|
||||
SPELL_SKULLS_TRAINEE = 27915,
|
||||
SPELL_SKULLS_DK = 27931,
|
||||
SPELL_SKULLS_RIDER = 27937,
|
||||
// Living trainee
|
||||
SPELL_DEATH_PLAGUE = 55604,
|
||||
// Dead trainee
|
||||
@@ -69,7 +69,7 @@ enum Misc
|
||||
NPC_DEAD_KNIGHT = 16148,
|
||||
NPC_DEAD_HORSE = 16149,
|
||||
NPC_DEAD_RIDER = 16150,
|
||||
//NPC_TRIGGER = 16137, fix me
|
||||
NPC_TRIGGER = 16137
|
||||
};
|
||||
|
||||
enum Events
|
||||
@@ -264,31 +264,41 @@ public:
|
||||
void JustSummoned(Creature* summon) override
|
||||
{
|
||||
summons.Summon(summon);
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::MinDistance, 0, 200.0f))
|
||||
// If central gate is open, attack any one
|
||||
if (gateOpened)
|
||||
{
|
||||
if (gateOpened)
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::MinDistance, 0, 200.0f))
|
||||
{
|
||||
summon->AI()->AttackStart(target);
|
||||
summon->CallForHelp(40.0f);
|
||||
summon->SetInCombatWithZone();
|
||||
summon->SetReactState(REACT_AGGRESSIVE);
|
||||
summon->CallForHelp(150.0f);
|
||||
}
|
||||
else
|
||||
}
|
||||
// Else look for a random target on the side the summoned NPC is
|
||||
else
|
||||
{
|
||||
Map::PlayerList const& pList = me->GetMap()->GetPlayers();
|
||||
std::vector<Player*> tList;
|
||||
for(Map::PlayerList::const_iterator itr = pList.begin(); itr != pList.end(); ++itr)
|
||||
{
|
||||
if (summon->GetEntry() == NPC_LIVING_TRAINEE ||
|
||||
summon->GetEntry() == NPC_LIVING_KNIGHT ||
|
||||
summon->GetEntry() == NPC_LIVING_RIDER )
|
||||
if (!me->IsWithinDistInMap(itr->GetSource(), 200.0f, true, false) || !itr->GetSource()->IsAlive() || itr->GetSource()->IsGameMaster())
|
||||
{
|
||||
if (IN_LIVE_SIDE(target))
|
||||
{
|
||||
summon->AI()->AttackStart(target);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
else
|
||||
if (IN_LIVE_SIDE(itr->GetSource()) != IN_LIVE_SIDE(summon))
|
||||
{
|
||||
if (!IN_LIVE_SIDE(target))
|
||||
{
|
||||
summon->AI()->AttackStart(target);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
tList.push_back(itr->GetSource());
|
||||
}
|
||||
if (!tList.empty())
|
||||
{
|
||||
Player* target = tList[urand(0, tList.size() - 1)];
|
||||
summon->AI()->AttackStart(target);
|
||||
summon->SetInCombatWithZone();
|
||||
summon->SetReactState(REACT_AGGRESSIVE);
|
||||
summon->CallForHelp(150.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -391,25 +401,6 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo) override
|
||||
{
|
||||
uint8 pos = urand(0, 4);
|
||||
switch (spellInfo->Id)
|
||||
{
|
||||
case SPELL_INFORM_LIVING_TRAINEE:
|
||||
me->SummonCreature(NPC_DEAD_TRAINEE, PosSummonDead[pos].GetPositionX(), PosSummonDead[pos].GetPositionY(), PosSummonDead[pos].GetPositionZ(), PosSummonDead[pos].GetOrientation());
|
||||
break;
|
||||
case SPELL_INFORM_LIVING_KNIGHT:
|
||||
me->SummonCreature(NPC_DEAD_KNIGHT, PosSummonDead[pos].GetPositionX(), PosSummonDead[pos].GetPositionY(), PosSummonDead[pos].GetPositionZ(), PosSummonDead[pos].GetOrientation());
|
||||
break;
|
||||
case SPELL_INFORM_LIVING_RIDER:
|
||||
me->SummonCreature(NPC_DEAD_RIDER, PosSummonDead[pos].GetPositionX(), PosSummonDead[pos].GetPositionY(), PosSummonDead[pos].GetPositionZ(), PosSummonDead[pos].GetOrientation());
|
||||
me->SummonCreature(NPC_DEAD_HORSE, PosSummonDead[pos].GetPositionX(), PosSummonDead[pos].GetPositionY(), PosSummonDead[pos].GetPositionZ(), PosSummonDead[pos].GetOrientation());
|
||||
break;
|
||||
}
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_SPELL_CAST);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit*, uint32& damage, DamageEffectType, SpellSchoolMask) override
|
||||
{
|
||||
if (!secondPhase)
|
||||
@@ -580,13 +571,13 @@ public:
|
||||
switch (me->GetEntry())
|
||||
{
|
||||
case NPC_LIVING_TRAINEE:
|
||||
me->CastSpell(me, SPELL_INFORM_LIVING_TRAINEE, true);
|
||||
DoCastAOE(SPELL_ANCHOR_1_TRAINEE, true);
|
||||
break;
|
||||
case NPC_LIVING_KNIGHT:
|
||||
me->CastSpell(me, SPELL_INFORM_LIVING_KNIGHT, true);
|
||||
DoCastAOE(SPELL_ANCHOR_1_DK, true);
|
||||
break;
|
||||
case NPC_LIVING_RIDER:
|
||||
me->CastSpell(me, SPELL_INFORM_LIVING_RIDER, true);
|
||||
DoCastAOE(SPELL_ANCHOR_1_RIDER, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -675,6 +666,109 @@ public:
|
||||
};
|
||||
};
|
||||
|
||||
class npc_gothik_trigger : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_gothik_trigger() : CreatureScript("npc_gothik_trigger") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_gothik_triggerAI(creature);
|
||||
}
|
||||
|
||||
struct npc_gothik_triggerAI : public ScriptedAI
|
||||
{
|
||||
npc_gothik_triggerAI(Creature* creature) : ScriptedAI(creature) { creature->SetDisableGravity(true); }
|
||||
|
||||
void EnterEvadeMode(EvadeReason /*why*/) override {}
|
||||
void UpdateAI(uint32 /*diff*/) override {}
|
||||
void JustEngagedWith(Unit* /*who*/) override {}
|
||||
void DamageTaken(Unit* /*who*/, uint32& damage, DamageEffectType /*damagetype*/, SpellSchoolMask /*damageSchoolMask*/) override { damage = 0; }
|
||||
|
||||
Creature* SelectRandomSkullPile()
|
||||
{
|
||||
std::list<Creature*> triggers;
|
||||
me->GetCreatureListWithEntryInGrid(triggers, NPC_TRIGGER, 150.0f);
|
||||
// Remove triggers that are on live side or soul triggers on the platform
|
||||
triggers.remove_if([](Creature* trigger){
|
||||
return ((trigger->GetPositionY() < POS_Y_GATE) || (trigger->GetPositionZ() > 280.0f));
|
||||
});
|
||||
if (!triggers.empty())
|
||||
{
|
||||
std::list<Creature*>::iterator itr = triggers.begin();
|
||||
std::advance(itr, urand(0, triggers.size() - 1));
|
||||
return *itr;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
|
||||
{
|
||||
if (!spell)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
switch (spell->Id)
|
||||
{
|
||||
case SPELL_ANCHOR_1_TRAINEE:
|
||||
DoCastAOE(SPELL_ANCHOR_2_TRAINEE, true);
|
||||
break;
|
||||
case SPELL_ANCHOR_1_DK:
|
||||
DoCastAOE(SPELL_ANCHOR_2_DK, true);
|
||||
break;
|
||||
case SPELL_ANCHOR_1_RIDER:
|
||||
DoCastAOE(SPELL_ANCHOR_2_RIDER, true);
|
||||
break;
|
||||
case SPELL_ANCHOR_2_TRAINEE:
|
||||
if (Creature* target = SelectRandomSkullPile())
|
||||
{
|
||||
DoCast(target, SPELL_SKULLS_TRAINEE, true);
|
||||
}
|
||||
break;
|
||||
case SPELL_ANCHOR_2_DK:
|
||||
if (Creature* target = SelectRandomSkullPile())
|
||||
{
|
||||
DoCast(target, SPELL_SKULLS_DK, true);
|
||||
}
|
||||
break;
|
||||
case SPELL_ANCHOR_2_RIDER:
|
||||
if (Creature* target = SelectRandomSkullPile())
|
||||
{
|
||||
DoCast(target, SPELL_SKULLS_RIDER, true);
|
||||
}
|
||||
break;
|
||||
case SPELL_SKULLS_TRAINEE:
|
||||
DoSummon(NPC_DEAD_TRAINEE, me, 0.0f, 15 * IN_MILLISECONDS, TEMPSUMMON_CORPSE_TIMED_DESPAWN);
|
||||
break;
|
||||
case SPELL_SKULLS_DK:
|
||||
DoSummon(NPC_DEAD_KNIGHT, me, 0.0f, 15 * IN_MILLISECONDS, TEMPSUMMON_CORPSE_TIMED_DESPAWN);
|
||||
break;
|
||||
case SPELL_SKULLS_RIDER:
|
||||
DoSummon(NPC_DEAD_RIDER, me, 0.0f, 15 * IN_MILLISECONDS, TEMPSUMMON_CORPSE_TIMED_DESPAWN);
|
||||
DoSummon(NPC_DEAD_HORSE, me, 0.0f, 15 * IN_MILLISECONDS, TEMPSUMMON_CORPSE_TIMED_DESPAWN);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// dead side summons are "owned" by gothik
|
||||
void JustSummoned(Creature* summon) override
|
||||
{
|
||||
if (Creature* gothik = ObjectAccessor::GetCreature(*me, me->GetInstanceScript()->GetGuidData(DATA_GOTHIK_BOSS)))
|
||||
{
|
||||
gothik->AI()->JustSummoned(summon);
|
||||
}
|
||||
}
|
||||
void SummonedCreatureDespawn(Creature* summon) override
|
||||
{
|
||||
if (Creature* gothik = ObjectAccessor::GetCreature(*me, me->GetInstanceScript()->GetGuidData(DATA_GOTHIK_BOSS)))
|
||||
{
|
||||
gothik->AI()->SummonedCreatureDespawn(summon);
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
class spell_gothik_shadow_bolt_volley : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_gothik_shadow_bolt_volley);
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
#include "boss_maexxna.h"
|
||||
#include "CreatureScript.h"
|
||||
#include "Player.h"
|
||||
#include "PassiveAI.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "SpellScript.h"
|
||||
|
||||
@@ -137,6 +137,7 @@ public:
|
||||
GuidList PatchwerkRoomTrash;
|
||||
ObjectGuid _patchwerkGUID;
|
||||
ObjectGuid _thaddiusGUID;
|
||||
ObjectGuid _gothikGUID;
|
||||
ObjectGuid _stalaggGUID;
|
||||
ObjectGuid _feugenGUID;
|
||||
ObjectGuid _zeliekGUID;
|
||||
@@ -227,6 +228,9 @@ public:
|
||||
case NPC_FEUGEN:
|
||||
_feugenGUID = creature->GetGUID();
|
||||
return;
|
||||
case NPC_GOTHIK:
|
||||
_gothikGUID = creature->GetGUID();
|
||||
return;
|
||||
case NPC_LADY_BLAUMEUX:
|
||||
_blaumeuxGUID = creature->GetGUID();
|
||||
return;
|
||||
@@ -1092,6 +1096,8 @@ public:
|
||||
return _stalaggGUID;
|
||||
case DATA_FEUGEN_BOSS:
|
||||
return _feugenGUID;
|
||||
case DATA_GOTHIK_BOSS:
|
||||
return _gothikGUID;
|
||||
case DATA_LICH_KING_BOSS:
|
||||
return _lichkingGUID;
|
||||
default:
|
||||
|
||||
@@ -58,25 +58,26 @@ enum NXData
|
||||
DATA_STALAGG_BOSS = 108,
|
||||
DATA_FEUGEN_BOSS = 109,
|
||||
DATA_THADDIUS_GATE = 110,
|
||||
DATA_GOTHIK_ENTER_GATE = 111,
|
||||
DATA_GOTHIK_INNER_GATE = 112,
|
||||
DATA_GOTHIK_EXIT_GATE = 113,
|
||||
DATA_HORSEMEN_GATE = 114,
|
||||
DATA_LICH_KING_BOSS = 115,
|
||||
DATA_KELTHUZAD_FLOOR = 116,
|
||||
DATA_ABOMINATION_KILLED = 117,
|
||||
DATA_FRENZY_REMOVED = 118,
|
||||
DATA_CHARGES_CROSSED = 119,
|
||||
DATA_SPORE_KILLED = 120,
|
||||
DATA_HUNDRED_CLUB = 121,
|
||||
DATA_DANCE_FAIL = 122,
|
||||
DATA_IMMORTAL_FAIL = 123,
|
||||
DATA_KELTHUZAD_GATE = 124,
|
||||
DATA_HAD_THADDIUS_GREET = 125,
|
||||
DATA_KELTHUZAD_PORTAL_1 = 126,
|
||||
DATA_KELTHUZAD_PORTAL_2 = 127,
|
||||
DATA_KELTHUZAD_PORTAL_3 = 128,
|
||||
DATA_KELTHUZAD_PORTAL_4 = 129
|
||||
DATA_GOTHIK_BOSS = 111,
|
||||
DATA_GOTHIK_ENTER_GATE = 112,
|
||||
DATA_GOTHIK_INNER_GATE = 113,
|
||||
DATA_GOTHIK_EXIT_GATE = 114,
|
||||
DATA_HORSEMEN_GATE = 115,
|
||||
DATA_LICH_KING_BOSS = 116,
|
||||
DATA_KELTHUZAD_FLOOR = 117,
|
||||
DATA_ABOMINATION_KILLED = 118,
|
||||
DATA_FRENZY_REMOVED = 119,
|
||||
DATA_CHARGES_CROSSED = 120,
|
||||
DATA_SPORE_KILLED = 121,
|
||||
DATA_HUNDRED_CLUB = 122,
|
||||
DATA_DANCE_FAIL = 123,
|
||||
DATA_IMMORTAL_FAIL = 124,
|
||||
DATA_KELTHUZAD_GATE = 125,
|
||||
DATA_HAD_THADDIUS_GREET = 126,
|
||||
DATA_KELTHUZAD_PORTAL_1 = 127,
|
||||
DATA_KELTHUZAD_PORTAL_2 = 128,
|
||||
DATA_KELTHUZAD_PORTAL_3 = 129,
|
||||
DATA_KELTHUZAD_PORTAL_4 = 130
|
||||
};
|
||||
|
||||
enum NXGOs
|
||||
@@ -162,6 +163,9 @@ enum NXNPCs
|
||||
NPC_LIVING_MONSTROSITY = 16021,
|
||||
NPC_SURGICAL_ASSIST = 16022,
|
||||
NPC_SLUDGE_BELCHER = 16029,
|
||||
|
||||
// Gothik
|
||||
NPC_GOTHIK = 16060
|
||||
};
|
||||
|
||||
enum NXMisc
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "oculus.h"
|
||||
#include "CombatAI.h"
|
||||
#include "CreatureScript.h"
|
||||
#include "InstanceScript.h"
|
||||
@@ -27,7 +28,6 @@
|
||||
#include "SpellScript.h"
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "Vehicle.h"
|
||||
#include "oculus.h"
|
||||
#include <unordered_map>
|
||||
|
||||
enum Drakes
|
||||
|
||||
@@ -15,20 +15,20 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ulduar.h"
|
||||
#include "AreaTriggerScript.h"
|
||||
#include "CombatAI.h"
|
||||
#include "CreatureScript.h"
|
||||
#include "GameObjectScript.h"
|
||||
#include "PassiveAI.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "PassiveAI.h"
|
||||
#include "ScriptedGossip.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "SpellScript.h"
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "TaskScheduler.h"
|
||||
#include "Vehicle.h"
|
||||
#include "ulduar.h"
|
||||
|
||||
enum Texts
|
||||
{
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "utgarde_keep.h"
|
||||
#include "CreatureScript.h"
|
||||
#include "GameObjectAI.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "Vehicle.h"
|
||||
#include "utgarde_keep.h"
|
||||
|
||||
class npc_dragonflayer_forge_master : public CreatureScript
|
||||
{
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "utgarde_pinnacle.h"
|
||||
#include "SpellInfo.h"
|
||||
#include "SpellScript.h"
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "Unit.h"
|
||||
#include "utgarde_pinnacle.h"
|
||||
|
||||
enum UtgardeSpells
|
||||
{
|
||||
|
||||
@@ -121,7 +121,7 @@ public:
|
||||
if (!PlayerList.IsEmpty())
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
if (Player* player = i->GetSource())
|
||||
player->TeleportTo(player->m_homebindMapId, player->m_homebindX, player->m_homebindY, player->m_homebindZ, player->m_homebindO);
|
||||
player->TeleportTo(player->m_homebindMapId, player->m_homebindX, player->m_homebindY, player->m_homebindZ, player->GetOrientation());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "violet_hold.h"
|
||||
#include "CreatureScript.h"
|
||||
#include "GameObjectScript.h"
|
||||
#include "PassiveAI.h"
|
||||
@@ -24,7 +25,6 @@
|
||||
#include "ScriptedGossip.h"
|
||||
#include "SpellScript.h"
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "violet_hold.h"
|
||||
|
||||
/// @todo: Missing Sinclari Trigger announcements (32204) Look at its creature_text for more info.
|
||||
/// @todo: Activation Crystals (go_vh_activation_crystal) (193611) are spammable, should be a 1 time use per crystal.
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
*/
|
||||
|
||||
#include "CreatureScript.h"
|
||||
#include "Player.h"
|
||||
#include "MoveSplineInit.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptedGossip.h"
|
||||
#include "World.h"
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "CreatureScript.h"
|
||||
#include "CreatureTextMgr.h"
|
||||
#include "GameObjectScript.h"
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "PassiveAI.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptedCreature.h"
|
||||
@@ -30,7 +31,6 @@
|
||||
#include "SpellScript.h"
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "Vehicle.h"
|
||||
#include "GridNotifiersImpl.h"
|
||||
|
||||
// Ours
|
||||
/********
|
||||
|
||||
@@ -17,15 +17,15 @@
|
||||
|
||||
#include "OutdoorPvPNA.h"
|
||||
#include "CreatureScript.h"
|
||||
#include "GridNotifiers.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "GameGraveyard.h"
|
||||
#include "GridNotifiers.h"
|
||||
#include "Language.h"
|
||||
#include "MapMgr.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "OutdoorPvPMgr.h"
|
||||
#include "OutdoorPvPScript.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "World.h"
|
||||
#include "WorldPacket.h"
|
||||
|
||||
|
||||
+1
-1
@@ -19,10 +19,10 @@
|
||||
#include "InstanceMapScript.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "TemporarySummon.h"
|
||||
#include "serpent_shrine.h"
|
||||
#include "ScriptedCreature.h"
|
||||
|
||||
DoorData const doorData[] =
|
||||
{
|
||||
|
||||
@@ -15,13 +15,12 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "CreatureScript.h"
|
||||
#include "GameObjectScript.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "Containers.h"
|
||||
#include "CreatureScript.h"
|
||||
#include "CreatureTextMgr.h"
|
||||
#include "GameObject.h"
|
||||
#include "GameObjectAI.h"
|
||||
#include "GameObjectScript.h"
|
||||
#include "Group.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "LFGMgr.h"
|
||||
@@ -30,6 +29,7 @@
|
||||
#include "ObjectAccessor.h"
|
||||
#include "PassiveAI.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptedGossip.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
|
||||
@@ -15,13 +15,13 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <cmath>
|
||||
#include "CreatureScript.h"
|
||||
#include "MoveSplineInit.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "WaypointMgr.h"
|
||||
#include "the_eye.h"
|
||||
#include <cmath>
|
||||
|
||||
enum Spells
|
||||
{
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "arcatraz.h"
|
||||
#include "CreatureScript.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "arcatraz.h"
|
||||
|
||||
enum MillhouseSays
|
||||
{
|
||||
|
||||
@@ -3973,7 +3973,7 @@ class spell_item_eye_of_grillok_aura : public AuraScript
|
||||
return ValidateSpellInfo({ SPELL_EYE_OF_GRILLOK });
|
||||
}
|
||||
|
||||
void OnPeriodic(AuraEffect const* aurEff)
|
||||
void OnPeriodic(AuraEffect const* /*aurEff*/)
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
if (!caster || !GetTarget())
|
||||
|
||||
@@ -20,10 +20,10 @@
|
||||
|
||||
#include "DeadlineTimer.h"
|
||||
#include "Define.h"
|
||||
#include "Socket.h"
|
||||
#include "Errors.h"
|
||||
#include "IoContext.h"
|
||||
#include "Log.h"
|
||||
#include "Socket.h"
|
||||
#include "Timer.h"
|
||||
#include <atomic>
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
#include "Log.h"
|
||||
#include "MessageBuffer.h"
|
||||
#include <atomic>
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <queue>
|
||||
|
||||
Reference in New Issue
Block a user