mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-22 22:51:10 -04:00
Core: Remove Player.h dependency from all the possible headers
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include "SpellInfo.h"
|
||||
#include "Vehicle.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "Player.h"
|
||||
|
||||
int AggressorAI::Permissible(const Creature* creature)
|
||||
{
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "ConditionMgr.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "SpellInfo.h"
|
||||
#include "Player.h"
|
||||
|
||||
// -------------------
|
||||
void CreatureEventAIMgr::LoadCreatureEventAI_Texts()
|
||||
|
||||
@@ -12,6 +12,7 @@ EndScriptData */
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptedEscortAI.h"
|
||||
#include "Group.h"
|
||||
#include "Player.h"
|
||||
|
||||
enum ePoints
|
||||
{
|
||||
|
||||
@@ -12,6 +12,7 @@ EndScriptData */
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptedFollowerAI.h"
|
||||
#include "Group.h"
|
||||
#include "Player.h"
|
||||
|
||||
const float MAX_PLAYER_DISTANCE = 100.0f;
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#ifndef SC_GOSSIP_H
|
||||
#define SC_GOSSIP_H
|
||||
|
||||
#include "Player.h"
|
||||
#include "GossipDef.h"
|
||||
#include "QuestDef.h"
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "Battlefield.h"
|
||||
#include "BattlefieldMgr.h"
|
||||
#include "Opcodes.h"
|
||||
#include "Player.h"
|
||||
|
||||
//This send to player windows for invite player to join the war
|
||||
//Param1:(BattleId) the BattleId of Bf
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "BattlefieldWG.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "Vehicle.h"
|
||||
#include "Player.h"
|
||||
|
||||
enum WGVehicles
|
||||
{
|
||||
|
||||
@@ -21,11 +21,9 @@
|
||||
|
||||
#include "ObjectAccessor.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "World.h"
|
||||
#include "Group.h"
|
||||
#include "GroupMgr.h"
|
||||
#include "Battlefield.h"
|
||||
|
||||
class Group;
|
||||
class BattlefieldWG;
|
||||
class WintergraspCapturePoint;
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "World.h"
|
||||
#include "Group.h"
|
||||
#include "ArenaTeamMgr.h"
|
||||
#include "Player.h"
|
||||
|
||||
ArenaTeam::ArenaTeam()
|
||||
: TeamId(0), Type(0), TeamName(), CaptainGuid(0), BackgroundColor(0), EmblemStyle(0), EmblemColor(0),
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "DatabaseEnv.h"
|
||||
#include "Language.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "Player.h"
|
||||
|
||||
ArenaTeamMgr::ArenaTeamMgr()
|
||||
{
|
||||
|
||||
@@ -168,23 +168,6 @@ struct BattlegroundObjectInfo
|
||||
uint32 spellid;
|
||||
};
|
||||
|
||||
// handle the queue types and bg types separately to enable joining queue for different sized arenas at the same time
|
||||
enum BattlegroundQueueTypeId
|
||||
{
|
||||
BATTLEGROUND_QUEUE_NONE = 0,
|
||||
BATTLEGROUND_QUEUE_AV = 1,
|
||||
BATTLEGROUND_QUEUE_WS = 2,
|
||||
BATTLEGROUND_QUEUE_AB = 3,
|
||||
BATTLEGROUND_QUEUE_EY = 4,
|
||||
BATTLEGROUND_QUEUE_SA = 5,
|
||||
BATTLEGROUND_QUEUE_IC = 6,
|
||||
BATTLEGROUND_QUEUE_RB = 7,
|
||||
BATTLEGROUND_QUEUE_2v2 = 8,
|
||||
BATTLEGROUND_QUEUE_3v3 = 9,
|
||||
BATTLEGROUND_QUEUE_5v5 = 10,
|
||||
MAX_BATTLEGROUND_QUEUE_TYPES
|
||||
};
|
||||
|
||||
enum ScoreType
|
||||
{
|
||||
SCORE_KILLING_BLOWS = 1,
|
||||
@@ -253,27 +236,6 @@ enum BattlegroundStartingEventsIds
|
||||
};
|
||||
#define BG_STARTING_EVENT_COUNT 4
|
||||
|
||||
enum GroupJoinBattlegroundResult
|
||||
{
|
||||
// positive values are indexes in BattlemasterList.dbc
|
||||
ERR_GROUP_JOIN_BATTLEGROUND_FAIL = 0, // Your group has joined a battleground queue, but you are not eligible (showed for non existing BattlemasterList.dbc indexes)
|
||||
ERR_BATTLEGROUND_NONE = -1, // not show anything
|
||||
ERR_GROUP_JOIN_BATTLEGROUND_DESERTERS = -2, // You cannot join the battleground yet because you or one of your party members is flagged as a Deserter.
|
||||
ERR_ARENA_TEAM_PARTY_SIZE = -3, // Incorrect party size for this arena.
|
||||
ERR_BATTLEGROUND_TOO_MANY_QUEUES = -4, // You can only be queued for 2 battles at once
|
||||
ERR_BATTLEGROUND_CANNOT_QUEUE_FOR_RATED = -5, // You cannot queue for a rated match while queued for other battles
|
||||
ERR_BATTLEDGROUND_QUEUED_FOR_RATED = -6, // You cannot queue for another battle while queued for a rated arena match
|
||||
ERR_BATTLEGROUND_TEAM_LEFT_QUEUE = -7, // Your team has left the arena queue
|
||||
ERR_BATTLEGROUND_NOT_IN_BATTLEGROUND = -8, // You can't do that in a battleground.
|
||||
ERR_BATTLEGROUND_JOIN_XP_GAIN = -9, // wtf, doesn't exist in client...
|
||||
ERR_BATTLEGROUND_JOIN_RANGE_INDEX = -10, // Cannot join the queue unless all members of your party are in the same battleground level range.
|
||||
ERR_BATTLEGROUND_JOIN_TIMED_OUT = -11, // %s was unavailable to join the queue. (uint64 guid exist in client cache)
|
||||
ERR_BATTLEGROUND_JOIN_FAILED = -12, // Join as a group failed (uint64 guid doesn't exist in client cache)
|
||||
ERR_LFG_CANT_USE_BATTLEGROUND = -13, // You cannot queue for a battleground or arena while using the dungeon system.
|
||||
ERR_IN_RANDOM_BG = -14, // Can't do that while in a Random Battleground queue.
|
||||
ERR_IN_NON_RANDOM_BG = -15 // Can't queue for Random Battleground while in another Battleground queue.
|
||||
};
|
||||
|
||||
struct BattlegroundScore
|
||||
{
|
||||
BattlegroundScore() : KillingBlows(0), Deaths(0), HonorableKills(0), BonusHonor(0),
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "ArenaTeamMgr.h"
|
||||
#include "Log.h"
|
||||
#include "Group.h"
|
||||
#include "Player.h"
|
||||
|
||||
/*********************************************************/
|
||||
/*** BATTLEGROUND QUEUE SYSTEM ***/
|
||||
@@ -216,7 +217,7 @@ GroupQueueInfo* BattlegroundQueue::AddGroup(Player* leader, Group* grp, Battlegr
|
||||
// Show queue status to player only (when joining queue)
|
||||
if (sWorld->getBoolConfig(CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_PLAYERONLY))
|
||||
{
|
||||
ChatHandler(leader).PSendSysMessage(LANG_BG_QUEUE_ANNOUNCE_SELF, bgName, q_min_level, q_max_level,
|
||||
ChatHandler(leader->GetSession()).PSendSysMessage(LANG_BG_QUEUE_ANNOUNCE_SELF, bgName, q_min_level, q_max_level,
|
||||
qAlliance, (MinPlayers > qAlliance) ? MinPlayers - qAlliance : (uint32)0, qHorde, (MinPlayers > qHorde) ? MinPlayers - qHorde : (uint32)0);
|
||||
}
|
||||
// System message
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
#define __BATTLEGROUNDIC_H
|
||||
|
||||
#include "Battleground.h"
|
||||
#include "Language.h"
|
||||
#include "Object.h"
|
||||
|
||||
const uint32 BG_IC_Factions[2] =
|
||||
{
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "World.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "AccountMgr.h"
|
||||
#include "Player.h"
|
||||
|
||||
Channel::Channel(const std::string& name, uint32 channel_id, uint32 Team) : m_announce(true),
|
||||
m_ownership(true), m_name(name), m_password(""), m_flags(0), m_channelId(channel_id),
|
||||
@@ -385,7 +386,7 @@ void Channel::Password(uint64 p, const char *pass)
|
||||
if (player)
|
||||
sec = player->GetSession()->GetSecurity();
|
||||
|
||||
ChatHandler chat(player);
|
||||
ChatHandler chat(player->GetSession());
|
||||
|
||||
if (!IsOn(p))
|
||||
{
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#include "Common.h"
|
||||
|
||||
#include "Opcodes.h"
|
||||
#include "Player.h"
|
||||
#include "WorldPacket.h"
|
||||
|
||||
enum ChatNotify
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
#include "ChannelMgr.h"
|
||||
|
||||
#include "Player.h"
|
||||
#include "World.h"
|
||||
|
||||
ChannelMgr::~ChannelMgr()
|
||||
|
||||
@@ -1169,6 +1169,11 @@ int ChatHandler::GetSessionDbLocaleIndex() const
|
||||
return m_session->GetSessionDbLocaleIndex();
|
||||
}
|
||||
|
||||
std::string ChatHandler::GetNameLink(Player* chr) const
|
||||
{
|
||||
return playerLink(chr->GetName());
|
||||
}
|
||||
|
||||
const char *CliHandler::GetTrinityString(int32 entry) const
|
||||
{
|
||||
return sObjectMgr->GetTrinityStringForDBCLocale(entry);
|
||||
|
||||
@@ -20,16 +20,18 @@
|
||||
#define TRINITYCORE_CHAT_H
|
||||
|
||||
#include "SharedDefines.h"
|
||||
#include "Player.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
class ChatHandler;
|
||||
class WorldSession;
|
||||
class WorldObject;
|
||||
class Creature;
|
||||
class Group;
|
||||
class Player;
|
||||
class Unit;
|
||||
class WorldSession;
|
||||
class WorldObject;
|
||||
|
||||
struct GameTele;
|
||||
|
||||
class ChatCommand
|
||||
@@ -48,7 +50,6 @@ class ChatHandler
|
||||
public:
|
||||
WorldSession* GetSession() { return m_session; }
|
||||
explicit ChatHandler(WorldSession* session) : m_session(session), sentErrorMessage(false) {}
|
||||
explicit ChatHandler(Player* player) : m_session(player->GetSession()), sentErrorMessage(false) {}
|
||||
virtual ~ChatHandler() {}
|
||||
|
||||
static void FillMessageData(WorldPacket* data, WorldSession* session, uint8 type, uint32 language, const char *channelName, uint64 target_guid, const char *message, Unit* speaker);
|
||||
@@ -115,7 +116,7 @@ class ChatHandler
|
||||
bool extractPlayerTarget(char* args, Player** player, uint64* player_guid = NULL, std::string* player_name = NULL);
|
||||
|
||||
std::string playerLink(std::string const& name) const { return m_session ? "|cffffffff|Hplayer:"+name+"|h["+name+"]|h|r" : name; }
|
||||
std::string GetNameLink(Player* chr) const { return playerLink(chr->GetName()); }
|
||||
std::string GetNameLink(Player* chr) const;
|
||||
|
||||
GameObject* GetNearbyGameObject();
|
||||
GameObject* GetObjectGlobalyWithGuidOrNearWithDbGuid(uint32 lowguid, uint32 entry);
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "SpellMgr.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "SpellInfo.h"
|
||||
#include "DBCStores.h"
|
||||
|
||||
// Supported shift-links (client generated and server side)
|
||||
// |color|Hachievement:achievement_id:player_guid:0:0:0:0:0:0:0:0|h[name]|h|r
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "OutdoorPvP.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "VMapManager2.h"
|
||||
#include "Player.h"
|
||||
|
||||
namespace DisableMgr
|
||||
{
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
#include "CreatureAI.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "TemporarySummon.h"
|
||||
#include "Pet.h"
|
||||
#include "Player.h"
|
||||
|
||||
TempSummon::TempSummon(SummonPropertiesEntry const* properties, Unit* owner, bool isWorldObject) :
|
||||
Creature(isWorldObject), m_Properties(properties), m_type(TEMPSUMMON_MANUAL_DESPAWN),
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "Bag.h"
|
||||
#include "Log.h"
|
||||
#include "UpdateData.h"
|
||||
#include "Player.h"
|
||||
|
||||
Bag::Bag(): Item()
|
||||
{
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "SpellInfo.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "ConditionMgr.h"
|
||||
#include "Player.h"
|
||||
|
||||
void AddItemsSetItem(Player* player, Item* item)
|
||||
{
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <list>
|
||||
#include <vector>
|
||||
#include "Util.h"
|
||||
#include "DBCStores.h"
|
||||
|
||||
struct EnchStoreItem
|
||||
{
|
||||
|
||||
@@ -85,26 +85,6 @@ enum PetTalk
|
||||
PET_TALK_ATTACK = 1
|
||||
};
|
||||
|
||||
enum PetNameInvalidReason
|
||||
{
|
||||
// custom, not send
|
||||
PET_NAME_SUCCESS = 0,
|
||||
|
||||
PET_NAME_INVALID = 1,
|
||||
PET_NAME_NO_NAME = 2,
|
||||
PET_NAME_TOO_SHORT = 3,
|
||||
PET_NAME_TOO_LONG = 4,
|
||||
PET_NAME_MIXED_LANGUAGES = 6,
|
||||
PET_NAME_PROFANE = 7,
|
||||
PET_NAME_RESERVED = 8,
|
||||
PET_NAME_THREE_CONSECUTIVE = 11,
|
||||
PET_NAME_INVALID_SPACE = 12,
|
||||
PET_NAME_CONSECUTIVE_SPACES = 13,
|
||||
PET_NAME_RUSSIAN_CONSECUTIVE_SILENT_CHARACTERS = 14,
|
||||
PET_NAME_RUSSIAN_SILENT_CHARACTER_AT_BEGINNING_OR_END = 15,
|
||||
PET_NAME_DECLENSION_DOESNT_MATCH_BASE_NAME = 16
|
||||
};
|
||||
|
||||
typedef UNORDERED_MAP<uint32, PetSpell> PetSpellMap;
|
||||
typedef std::vector<uint32> AutoSpellList;
|
||||
|
||||
|
||||
@@ -7259,7 +7259,7 @@ bool Player::RewardHonor(Unit* victim, uint32 groupsize, int32 honor, bool pvpto
|
||||
int32 count = sWorld->getIntConfig(CONFIG_PVP_TOKEN_COUNT);
|
||||
|
||||
if (AddItem(itemId, count))
|
||||
ChatHandler(this).PSendSysMessage("You have been awarded a token for slaying another player.");
|
||||
ChatHandler(GetSession()).PSendSysMessage("You have been awarded a token for slaying another player.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19967,7 +19967,7 @@ void Player::Whisper(const std::string& text, uint32 language, uint64 receiver)
|
||||
}
|
||||
else if (!isAddonMessage)
|
||||
// announce to player that player he is whispering to is dnd and cannot receive his message
|
||||
ChatHandler(this).PSendSysMessage(LANG_PLAYER_DND, rPlayer->GetName().c_str(), rPlayer->dndMsg.c_str());
|
||||
ChatHandler(GetSession()).PSendSysMessage(LANG_PLAYER_DND, rPlayer->GetName().c_str(), rPlayer->dndMsg.c_str());
|
||||
|
||||
// rest stuff shouldn't happen in case of addon message
|
||||
if (isAddonMessage)
|
||||
@@ -19976,12 +19976,12 @@ void Player::Whisper(const std::string& text, uint32 language, uint64 receiver)
|
||||
if (!isAcceptWhispers() && !isGameMaster() && !rPlayer->isGameMaster())
|
||||
{
|
||||
SetAcceptWhispers(true);
|
||||
ChatHandler(this).SendSysMessage(LANG_COMMAND_WHISPERON);
|
||||
ChatHandler(GetSession()).SendSysMessage(LANG_COMMAND_WHISPERON);
|
||||
}
|
||||
|
||||
// announce to player that player he is whispering to is afk
|
||||
if (rPlayer->isAFK())
|
||||
ChatHandler(this).PSendSysMessage(LANG_PLAYER_AFK, rPlayer->GetName().c_str(), rPlayer->afkMsg.c_str());
|
||||
ChatHandler(GetSession()).PSendSysMessage(LANG_PLAYER_AFK, rPlayer->GetName().c_str(), rPlayer->afkMsg.c_str());
|
||||
|
||||
// if player whisper someone, auto turn of dnd to be able to receive an answer
|
||||
if (isDND() && !rPlayer->isGameMaster())
|
||||
@@ -25330,7 +25330,7 @@ bool Player::AddItem(uint32 itemId, uint32 count)
|
||||
if (count == 0 || dest.empty())
|
||||
{
|
||||
// -- TODO: Send to mailbox if no space
|
||||
ChatHandler(this).PSendSysMessage("You don't have any space in your bags.");
|
||||
ChatHandler(GetSession()).PSendSysMessage("You don't have any space in your bags.");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#define _PLAYER_H
|
||||
|
||||
#include "AchievementMgr.h"
|
||||
#include "Battleground.h"
|
||||
#include "Bag.h"
|
||||
#include "Common.h"
|
||||
#include "DatabaseEnv.h"
|
||||
@@ -242,9 +241,7 @@ typedef std::list<PlayerCreateInfoAction> PlayerCreateInfoActions;
|
||||
struct PlayerInfo
|
||||
{
|
||||
// existence checked by displayId != 0
|
||||
PlayerInfo() : displayId_m(0), displayId_f(0), levelInfo(NULL)
|
||||
{
|
||||
}
|
||||
PlayerInfo() : displayId_m(0), displayId_f(0), levelInfo(NULL) { }
|
||||
|
||||
uint32 mapId;
|
||||
uint32 areaId;
|
||||
@@ -725,13 +722,6 @@ enum RestType
|
||||
REST_TYPE_IN_CITY = 2
|
||||
};
|
||||
|
||||
enum DuelCompleteType
|
||||
{
|
||||
DUEL_INTERRUPTED = 0,
|
||||
DUEL_WON = 1,
|
||||
DUEL_FLED = 2
|
||||
};
|
||||
|
||||
enum TeleportToOptions
|
||||
{
|
||||
TELE_TO_GM_MODE = 0x01,
|
||||
@@ -834,17 +824,6 @@ struct InstancePlayerBind
|
||||
InstancePlayerBind() : save(NULL), perm(false) {}
|
||||
};
|
||||
|
||||
enum DungeonStatusFlag
|
||||
{
|
||||
DUNGEON_STATUSFLAG_NORMAL = 0x01,
|
||||
DUNGEON_STATUSFLAG_HEROIC = 0x02,
|
||||
|
||||
RAID_STATUSFLAG_10MAN_NORMAL = 0x01,
|
||||
RAID_STATUSFLAG_25MAN_NORMAL = 0x02,
|
||||
RAID_STATUSFLAG_10MAN_HEROIC = 0x04,
|
||||
RAID_STATUSFLAG_25MAN_HEROIC = 0x08
|
||||
};
|
||||
|
||||
struct AccessRequirement
|
||||
{
|
||||
uint8 levelMin;
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "DBCStores.h"
|
||||
#include "World.h"
|
||||
#include "GameObjectAI.h"
|
||||
#include "Player.h"
|
||||
|
||||
void MapManager::LoadTransports()
|
||||
{
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "SpellMgr.h"
|
||||
#include "SpellInfo.h"
|
||||
#include "MoveSplineInit.h"
|
||||
#include "TemporarySummon.h"
|
||||
|
||||
Vehicle::Vehicle(Unit* unit, VehicleEntry const* vehInfo, uint32 creatureEntry) : _me(unit), _vehicleInfo(vehInfo), _usableSeatNum(0), _creatureEntry(creatureEntry)
|
||||
{
|
||||
|
||||
@@ -47,6 +47,12 @@ ObjectAccessor::~ObjectAccessor()
|
||||
{
|
||||
}
|
||||
|
||||
Player* ObjectAccessor::GetObjectInWorld(uint64 guid, Player* /*typeSpecifier*/)
|
||||
{
|
||||
Player* player = HashMapHolder<Player>::Find(guid);
|
||||
return player && player->IsInWorld() ? player : NULL;
|
||||
}
|
||||
|
||||
WorldObject* ObjectAccessor::GetWorldObject(WorldObject const& p, uint64 guid)
|
||||
{
|
||||
switch (GUID_HIPART(guid))
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
|
||||
#include "GridDefines.h"
|
||||
#include "Object.h"
|
||||
#include "Player.h"
|
||||
|
||||
#include <set>
|
||||
|
||||
@@ -116,11 +115,7 @@ class ObjectAccessor
|
||||
}
|
||||
|
||||
// Player may be not in world while in ObjectAccessor
|
||||
static Player* GetObjectInWorld(uint64 guid, Player* /*typeSpecifier*/)
|
||||
{
|
||||
Player* player = HashMapHolder<Player>::Find(guid);
|
||||
return player && player->IsInWorld() ? player : NULL;
|
||||
}
|
||||
static Player* GetObjectInWorld(uint64 guid, Player* /*typeSpecifier*/);
|
||||
|
||||
static Unit* GetObjectInWorld(uint64 guid, Unit* /*typeSpecifier*/)
|
||||
{
|
||||
|
||||
@@ -227,11 +227,29 @@ bool SpellClickInfo::IsFitToRequirements(Unit const* clicker, Unit const* clicke
|
||||
return true;
|
||||
}
|
||||
|
||||
ObjectMgr::ObjectMgr(): _auctionId(1), _equipmentSetGuid(1),
|
||||
_itemTextId(1), _mailId(1), _hiPetNumber(1), _hiCharGuid(1),
|
||||
_hiCreatureGuid(1), _hiPetGuid(1), _hiVehicleGuid(1), _hiItemGuid(1),
|
||||
_hiGoGuid(1), _hiDoGuid(1), _hiCorpseGuid(1), _hiMoTransGuid(1)
|
||||
{}
|
||||
ObjectMgr::ObjectMgr():
|
||||
_auctionId(1),
|
||||
_equipmentSetGuid(1),
|
||||
_itemTextId(1),
|
||||
_mailId(1),
|
||||
_hiPetNumber(1),
|
||||
_hiCharGuid(1),
|
||||
_hiCreatureGuid(1),
|
||||
_hiPetGuid(1),
|
||||
_hiVehicleGuid(1),
|
||||
_hiItemGuid(1),
|
||||
_hiGoGuid(1),
|
||||
_hiDoGuid(1),
|
||||
_hiCorpseGuid(1),
|
||||
_hiMoTransGuid(1)
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_CLASSES; ++i)
|
||||
{
|
||||
_playerClassInfo[i] = NULL;
|
||||
for (uint8 j = 0; j < MAX_RACES; ++j)
|
||||
_playerInfo[j][i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
ObjectMgr::~ObjectMgr()
|
||||
{
|
||||
@@ -243,11 +261,17 @@ ObjectMgr::~ObjectMgr()
|
||||
|
||||
// free only if loaded
|
||||
for (int class_ = 0; class_ < MAX_CLASSES; ++class_)
|
||||
delete[] _playerClassInfo[class_].levelInfo;
|
||||
{
|
||||
delete[] _playerClassInfo[class_]->levelInfo;
|
||||
delete _playerClassInfo[class_];
|
||||
}
|
||||
|
||||
for (int race = 0; race < MAX_RACES; ++race)
|
||||
for (int class_ = 0; class_ < MAX_CLASSES; ++class_)
|
||||
delete[] _playerInfo[race][class_].levelInfo;
|
||||
{
|
||||
delete[] _playerInfo[race][class_]->levelInfo;
|
||||
delete _playerInfo[race][class_];
|
||||
}
|
||||
|
||||
for (CacheVendorItemContainer::iterator itr = _cacheVendorItemStore.begin(); itr != _cacheVendorItemStore.end(); ++itr)
|
||||
itr->second.Clear();
|
||||
@@ -257,6 +281,9 @@ ObjectMgr::~ObjectMgr()
|
||||
for (DungeonEncounterContainer::iterator itr =_dungeonEncounterStore.begin(); itr != _dungeonEncounterStore.end(); ++itr)
|
||||
for (DungeonEncounterList::iterator encounterItr = itr->second.begin(); encounterItr != itr->second.end(); ++encounterItr)
|
||||
delete *encounterItr;
|
||||
|
||||
for (AccessRequirementContainer::iterator itr = _accessRequirementStore.begin(); itr != _accessRequirementStore.end(); ++itr)
|
||||
delete itr->second;
|
||||
}
|
||||
|
||||
void ObjectMgr::AddLocaleString(std::string const& s, LocaleConstant locale, StringVector& data)
|
||||
@@ -2924,7 +2951,7 @@ PetLevelInfo const* ObjectMgr::GetPetLevelInfo(uint32 creature_id, uint8 level)
|
||||
void ObjectMgr::PlayerCreateInfoAddItemHelper(uint32 race_, uint32 class_, uint32 itemId, int32 count)
|
||||
{
|
||||
if (count > 0)
|
||||
_playerInfo[race_][class_].item.push_back(PlayerCreateInfoItem(itemId, count));
|
||||
_playerInfo[race_][class_]->item.push_back(PlayerCreateInfoItem(itemId, count));
|
||||
else
|
||||
{
|
||||
if (count < -1)
|
||||
@@ -3031,17 +3058,16 @@ void ObjectMgr::LoadPlayerInfo()
|
||||
continue;
|
||||
}
|
||||
|
||||
PlayerInfo* pInfo = &_playerInfo[current_race][current_class];
|
||||
|
||||
pInfo->mapId = mapId;
|
||||
pInfo->areaId = areaId;
|
||||
pInfo->positionX = positionX;
|
||||
pInfo->positionY = positionY;
|
||||
pInfo->positionZ = positionZ;
|
||||
pInfo->orientation = orientation;
|
||||
|
||||
pInfo->displayId_m = rEntry->model_m;
|
||||
pInfo->displayId_f = rEntry->model_f;
|
||||
PlayerInfo* info = new PlayerInfo();
|
||||
info->mapId = mapId;
|
||||
info->areaId = areaId;
|
||||
info->positionX = positionX;
|
||||
info->positionY = positionY;
|
||||
info->positionZ = positionZ;
|
||||
info->orientation = orientation;
|
||||
info->displayId_m = rEntry->model_m;
|
||||
info->displayId_f = rEntry->model_f;
|
||||
_playerInfo[current_race][current_class] = info;
|
||||
|
||||
++count;
|
||||
}
|
||||
@@ -3164,10 +3190,11 @@ void ObjectMgr::LoadPlayerInfo()
|
||||
uint32 max_class = current_class ? current_class + 1 : MAX_CLASSES;
|
||||
for (uint32 r = min_race; r < max_race; ++r)
|
||||
for (uint32 c = min_class; c < max_class; ++c)
|
||||
_playerInfo[r][c].spell.push_back(fields[2].GetUInt32());
|
||||
if (PlayerInfo * info = _playerInfo[r][c])
|
||||
info->spell.push_back(fields[2].GetUInt32());
|
||||
}
|
||||
else
|
||||
_playerInfo[current_race][current_class].spell.push_back(fields[2].GetUInt32());
|
||||
_playerInfo[current_race][current_class]->spell.push_back(fields[2].GetUInt32());
|
||||
|
||||
++count;
|
||||
}
|
||||
@@ -3212,7 +3239,7 @@ void ObjectMgr::LoadPlayerInfo()
|
||||
continue;
|
||||
}
|
||||
|
||||
PlayerInfo* pInfo = &_playerInfo[current_race][current_class];
|
||||
PlayerInfo* pInfo = _playerInfo[current_race][current_class];
|
||||
pInfo->action.push_back(PlayerCreateInfoAction(fields[2].GetUInt16(), fields[3].GetUInt32(), fields[4].GetUInt16()));
|
||||
|
||||
++count;
|
||||
@@ -3228,13 +3255,12 @@ void ObjectMgr::LoadPlayerInfo()
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
// 0 1 2 3
|
||||
// 0 1 2 3
|
||||
QueryResult result = WorldDatabase.Query("SELECT class, level, basehp, basemana FROM player_classlevelstats");
|
||||
|
||||
if (!result)
|
||||
{
|
||||
sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 level health/mana definitions. DB table `game_event_condition` is empty.");
|
||||
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -3259,15 +3285,18 @@ void ObjectMgr::LoadPlayerInfo()
|
||||
continue;
|
||||
}
|
||||
|
||||
PlayerClassInfo* pClassInfo = &_playerClassInfo[current_class];
|
||||
PlayerClassInfo* info = _playerClassInfo[current_class];
|
||||
if (!info)
|
||||
{
|
||||
info = new PlayerClassInfo();
|
||||
info->levelInfo = new PlayerClassLevelInfo[sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)];
|
||||
_playerClassInfo[current_class] = info;
|
||||
}
|
||||
|
||||
if (!pClassInfo->levelInfo)
|
||||
pClassInfo->levelInfo = new PlayerClassLevelInfo[sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)];
|
||||
PlayerClassLevelInfo& levelInfo = info->levelInfo[current_level-1];
|
||||
|
||||
PlayerClassLevelInfo* pClassLevelInfo = &pClassInfo->levelInfo[current_level-1];
|
||||
|
||||
pClassLevelInfo->basehealth = fields[2].GetUInt16();
|
||||
pClassLevelInfo->basemana = fields[3].GetUInt16();
|
||||
levelInfo.basehealth = fields[2].GetUInt16();
|
||||
levelInfo.basemana = fields[3].GetUInt16();
|
||||
|
||||
++count;
|
||||
}
|
||||
@@ -3280,7 +3309,7 @@ void ObjectMgr::LoadPlayerInfo()
|
||||
if (!sChrClassesStore.LookupEntry(class_))
|
||||
continue;
|
||||
|
||||
PlayerClassInfo* pClassInfo = &_playerClassInfo[class_];
|
||||
PlayerClassInfo* pClassInfo = _playerClassInfo[class_];
|
||||
|
||||
// fatal error if no level 1 data
|
||||
if (!pClassInfo->levelInfo || pClassInfo->levelInfo[0].basehealth == 0)
|
||||
@@ -3351,7 +3380,7 @@ void ObjectMgr::LoadPlayerInfo()
|
||||
continue;
|
||||
}
|
||||
|
||||
PlayerInfo* pInfo = &_playerInfo[current_race][current_class];
|
||||
PlayerInfo* pInfo = _playerInfo[current_race][current_class];
|
||||
|
||||
if (!pInfo->levelInfo)
|
||||
pInfo->levelInfo = new PlayerLevelInfo[sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)];
|
||||
@@ -3380,10 +3409,8 @@ void ObjectMgr::LoadPlayerInfo()
|
||||
if (!sChrClassesStore.LookupEntry(class_))
|
||||
continue;
|
||||
|
||||
PlayerInfo* pInfo = &_playerInfo[race][class_];
|
||||
|
||||
// skip non loaded combinations
|
||||
if (!pInfo->displayId_m || !pInfo->displayId_f)
|
||||
PlayerInfo* info = _playerInfo[race][class_];
|
||||
if (!info)
|
||||
continue;
|
||||
|
||||
// skip expansion races if not playing with expansion
|
||||
@@ -3395,7 +3422,7 @@ void ObjectMgr::LoadPlayerInfo()
|
||||
continue;
|
||||
|
||||
// fatal error if no level 1 data
|
||||
if (!pInfo->levelInfo || pInfo->levelInfo[0].stats[0] == 0)
|
||||
if (!info->levelInfo || info->levelInfo[0].stats[0] == 0)
|
||||
{
|
||||
sLog->outError(LOG_FILTER_SQL, "Race %i Class %i Level 1 does not have stats data!", race, class_);
|
||||
exit(1);
|
||||
@@ -3404,10 +3431,10 @@ void ObjectMgr::LoadPlayerInfo()
|
||||
// fill level gaps
|
||||
for (uint8 level = 1; level < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL); ++level)
|
||||
{
|
||||
if (pInfo->levelInfo[level].stats[0] == 0)
|
||||
if (info->levelInfo[level].stats[0] == 0)
|
||||
{
|
||||
sLog->outError(LOG_FILTER_SQL, "Race %i Class %i Level %i does not have stats data. Using stats data of level %i.", race, class_, level+1, level);
|
||||
pInfo->levelInfo[level] = pInfo->levelInfo[level-1];
|
||||
info->levelInfo[level] = info->levelInfo[level-1];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3480,7 +3507,7 @@ void ObjectMgr::GetPlayerClassLevelInfo(uint32 class_, uint8 level, PlayerClassL
|
||||
if (level < 1 || class_ >= MAX_CLASSES)
|
||||
return;
|
||||
|
||||
PlayerClassInfo const* pInfo = &_playerClassInfo[class_];
|
||||
PlayerClassInfo const* pInfo = _playerClassInfo[class_];
|
||||
|
||||
if (level > sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
|
||||
level = sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL);
|
||||
@@ -3493,8 +3520,8 @@ void ObjectMgr::GetPlayerLevelInfo(uint32 race, uint32 class_, uint8 level, Play
|
||||
if (level < 1 || race >= MAX_RACES || class_ >= MAX_CLASSES)
|
||||
return;
|
||||
|
||||
PlayerInfo const* pInfo = &_playerInfo[race][class_];
|
||||
if (pInfo->displayId_m == 0 || pInfo->displayId_f == 0)
|
||||
PlayerInfo const* pInfo = _playerInfo[race][class_];
|
||||
if (!pInfo)
|
||||
return;
|
||||
|
||||
if (level <= sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
|
||||
@@ -3506,7 +3533,7 @@ void ObjectMgr::GetPlayerLevelInfo(uint32 race, uint32 class_, uint8 level, Play
|
||||
void ObjectMgr::BuildPlayerLevelInfo(uint8 race, uint8 _class, uint8 level, PlayerLevelInfo* info) const
|
||||
{
|
||||
// base data (last known level)
|
||||
*info = _playerInfo[race][_class].levelInfo[sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)-1];
|
||||
*info = _playerInfo[race][_class]->levelInfo[sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)-1];
|
||||
|
||||
// if conversion from uint32 to uint8 causes unexpected behaviour, change lvl to uint32
|
||||
for (uint8 lvl = sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)-1; lvl < level; ++lvl)
|
||||
@@ -5898,7 +5925,13 @@ void ObjectMgr::LoadAccessRequirements()
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
_accessRequirementStore.clear(); // need for reload case
|
||||
if (!_accessRequirementStore.empty())
|
||||
{
|
||||
for (AccessRequirementContainer::iterator itr = _accessRequirementStore.begin(); itr != _accessRequirementStore.end(); ++itr)
|
||||
delete itr->second;
|
||||
|
||||
_accessRequirementStore.clear(); // need for reload case
|
||||
}
|
||||
|
||||
// 0 1 2 3 4 5 6 7 8 9
|
||||
QueryResult result = WorldDatabase.Query("SELECT mapid, difficulty, level_min, level_max, item, item2, quest_done_A, quest_done_H, completed_achievement, quest_failed_text FROM access_requirement");
|
||||
@@ -5920,61 +5953,61 @@ void ObjectMgr::LoadAccessRequirements()
|
||||
uint8 difficulty = fields[1].GetUInt8();
|
||||
uint32 requirement_ID = MAKE_PAIR32(mapid, difficulty);
|
||||
|
||||
AccessRequirement ar;
|
||||
AccessRequirement* ar = new AccessRequirement();
|
||||
|
||||
ar.levelMin = fields[2].GetUInt8();
|
||||
ar.levelMax = fields[3].GetUInt8();
|
||||
ar.item = fields[4].GetUInt32();
|
||||
ar.item2 = fields[5].GetUInt32();
|
||||
ar.quest_A = fields[6].GetUInt32();
|
||||
ar.quest_H = fields[7].GetUInt32();
|
||||
ar.achievement = fields[8].GetUInt32();
|
||||
ar.questFailedText = fields[9].GetString();
|
||||
ar->levelMin = fields[2].GetUInt8();
|
||||
ar->levelMax = fields[3].GetUInt8();
|
||||
ar->item = fields[4].GetUInt32();
|
||||
ar->item2 = fields[5].GetUInt32();
|
||||
ar->quest_A = fields[6].GetUInt32();
|
||||
ar->quest_H = fields[7].GetUInt32();
|
||||
ar->achievement = fields[8].GetUInt32();
|
||||
ar->questFailedText = fields[9].GetString();
|
||||
|
||||
if (ar.item)
|
||||
if (ar->item)
|
||||
{
|
||||
ItemTemplate const* pProto = GetItemTemplate(ar.item);
|
||||
ItemTemplate const* pProto = GetItemTemplate(ar->item);
|
||||
if (!pProto)
|
||||
{
|
||||
sLog->outError(LOG_FILTER_GENERAL, "Key item %u does not exist for map %u difficulty %u, removing key requirement.", ar.item, mapid, difficulty);
|
||||
ar.item = 0;
|
||||
sLog->outError(LOG_FILTER_GENERAL, "Key item %u does not exist for map %u difficulty %u, removing key requirement.", ar->item, mapid, difficulty);
|
||||
ar->item = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (ar.item2)
|
||||
if (ar->item2)
|
||||
{
|
||||
ItemTemplate const* pProto = GetItemTemplate(ar.item2);
|
||||
ItemTemplate const* pProto = GetItemTemplate(ar->item2);
|
||||
if (!pProto)
|
||||
{
|
||||
sLog->outError(LOG_FILTER_GENERAL, "Second item %u does not exist for map %u difficulty %u, removing key requirement.", ar.item2, mapid, difficulty);
|
||||
ar.item2 = 0;
|
||||
sLog->outError(LOG_FILTER_GENERAL, "Second item %u does not exist for map %u difficulty %u, removing key requirement.", ar->item2, mapid, difficulty);
|
||||
ar->item2 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (ar.quest_A)
|
||||
if (ar->quest_A)
|
||||
{
|
||||
if (!GetQuestTemplate(ar.quest_A))
|
||||
if (!GetQuestTemplate(ar->quest_A))
|
||||
{
|
||||
sLog->outError(LOG_FILTER_SQL, "Required Alliance Quest %u not exist for map %u difficulty %u, remove quest done requirement.", ar.quest_A, mapid, difficulty);
|
||||
ar.quest_A = 0;
|
||||
sLog->outError(LOG_FILTER_SQL, "Required Alliance Quest %u not exist for map %u difficulty %u, remove quest done requirement.", ar->quest_A, mapid, difficulty);
|
||||
ar->quest_A = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (ar.quest_H)
|
||||
if (ar->quest_H)
|
||||
{
|
||||
if (!GetQuestTemplate(ar.quest_H))
|
||||
if (!GetQuestTemplate(ar->quest_H))
|
||||
{
|
||||
sLog->outError(LOG_FILTER_SQL, "Required Horde Quest %u not exist for map %u difficulty %u, remove quest done requirement.", ar.quest_H, mapid, difficulty);
|
||||
ar.quest_H = 0;
|
||||
sLog->outError(LOG_FILTER_SQL, "Required Horde Quest %u not exist for map %u difficulty %u, remove quest done requirement.", ar->quest_H, mapid, difficulty);
|
||||
ar->quest_H = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (ar.achievement)
|
||||
if (ar->achievement)
|
||||
{
|
||||
if (!sAchievementStore.LookupEntry(ar.achievement))
|
||||
if (!sAchievementStore.LookupEntry(ar->achievement))
|
||||
{
|
||||
sLog->outError(LOG_FILTER_SQL, "Required Achievement %u not exist for map %u difficulty %u, remove quest done requirement.", ar.achievement, mapid, difficulty);
|
||||
ar.achievement = 0;
|
||||
sLog->outError(LOG_FILTER_SQL, "Required Achievement %u not exist for map %u difficulty %u, remove quest done requirement.", ar->achievement, mapid, difficulty);
|
||||
ar->achievement = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8202,7 +8235,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max
|
||||
if (!cInfo)
|
||||
{
|
||||
if (player)
|
||||
ChatHandler(player).SendSysMessage(LANG_COMMAND_VENDORSELECTION);
|
||||
ChatHandler(player->GetSession()).SendSysMessage(LANG_COMMAND_VENDORSELECTION);
|
||||
else
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `(game_event_)npc_vendor` have data for not existed creature template (Entry: %u), ignore", vendor_entry);
|
||||
return false;
|
||||
@@ -8213,7 +8246,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max
|
||||
if (!skip_vendors || skip_vendors->count(vendor_entry) == 0)
|
||||
{
|
||||
if (player)
|
||||
ChatHandler(player).SendSysMessage(LANG_COMMAND_VENDORSELECTION);
|
||||
ChatHandler(player->GetSession()).SendSysMessage(LANG_COMMAND_VENDORSELECTION);
|
||||
else
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `(game_event_)npc_vendor` have data for not creature template (Entry: %u) without vendor flag, ignore", vendor_entry);
|
||||
|
||||
@@ -8226,7 +8259,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max
|
||||
if (!sObjectMgr->GetItemTemplate(item_id))
|
||||
{
|
||||
if (player)
|
||||
ChatHandler(player).PSendSysMessage(LANG_ITEM_NOT_FOUND, item_id);
|
||||
ChatHandler(player->GetSession()).PSendSysMessage(LANG_ITEM_NOT_FOUND, item_id);
|
||||
else
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `(game_event_)npc_vendor` for Vendor (Entry: %u) have in item list non-existed item (%u), ignore", vendor_entry, item_id);
|
||||
return false;
|
||||
@@ -8235,7 +8268,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max
|
||||
if (ExtendedCost && !sItemExtendedCostStore.LookupEntry(ExtendedCost))
|
||||
{
|
||||
if (player)
|
||||
ChatHandler(player).PSendSysMessage(LANG_EXTENDED_COST_NOT_EXIST, ExtendedCost);
|
||||
ChatHandler(player->GetSession()).PSendSysMessage(LANG_EXTENDED_COST_NOT_EXIST, ExtendedCost);
|
||||
else
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `(game_event_)npc_vendor` have Item (Entry: %u) with wrong ExtendedCost (%u) for vendor (%u), ignore", item_id, ExtendedCost, vendor_entry);
|
||||
return false;
|
||||
@@ -8244,7 +8277,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max
|
||||
if (maxcount > 0 && incrtime == 0)
|
||||
{
|
||||
if (player)
|
||||
ChatHandler(player).PSendSysMessage("MaxCount != 0 (%u) but IncrTime == 0", maxcount);
|
||||
ChatHandler(player->GetSession()).PSendSysMessage("MaxCount != 0 (%u) but IncrTime == 0", maxcount);
|
||||
else
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `(game_event_)npc_vendor` has `maxcount` (%u) for item %u of vendor (Entry: %u) but `incrtime`=0, ignore", maxcount, item_id, vendor_entry);
|
||||
return false;
|
||||
@@ -8252,7 +8285,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max
|
||||
else if (maxcount == 0 && incrtime > 0)
|
||||
{
|
||||
if (player)
|
||||
ChatHandler(player).PSendSysMessage("MaxCount == 0 but IncrTime<>= 0");
|
||||
ChatHandler(player->GetSession()).PSendSysMessage("MaxCount == 0 but IncrTime<>= 0");
|
||||
else
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `(game_event_)npc_vendor` has `maxcount`=0 for item %u of vendor (Entry: %u) but `incrtime`<>0, ignore", item_id, vendor_entry);
|
||||
return false;
|
||||
@@ -8265,7 +8298,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max
|
||||
if (vItems->FindItemCostPair(item_id, ExtendedCost))
|
||||
{
|
||||
if (player)
|
||||
ChatHandler(player).PSendSysMessage(LANG_ITEM_ALREADY_IN_LIST, item_id, ExtendedCost);
|
||||
ChatHandler(player->GetSession()).PSendSysMessage(LANG_ITEM_ALREADY_IN_LIST, item_id, ExtendedCost);
|
||||
else
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `npc_vendor` has duplicate items %u (with extended cost %u) for vendor (Entry: %u), ignoring", item_id, ExtendedCost, vendor_entry);
|
||||
return false;
|
||||
@@ -8274,7 +8307,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max
|
||||
if (vItems->GetItemCount() >= MAX_VENDOR_ITEMS)
|
||||
{
|
||||
if (player)
|
||||
ChatHandler(player).SendSysMessage(LANG_COMMAND_ADDVENDORITEMITEMS);
|
||||
ChatHandler(player->GetSession()).SendSysMessage(LANG_COMMAND_ADDVENDORITEMITEMS);
|
||||
else
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `npc_vendor` has too many items (%u >= %i) for vendor (Entry: %u), ignore", vItems->GetItemCount(), MAX_VENDOR_ITEMS, vendor_entry);
|
||||
return false;
|
||||
@@ -8695,3 +8728,15 @@ VehicleAccessoryList const* ObjectMgr::GetVehicleAccessoryList(Vehicle* veh) con
|
||||
return &itr->second;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
PlayerInfo const* ObjectMgr::GetPlayerInfo(uint32 race, uint32 class_) const
|
||||
{
|
||||
if (race >= MAX_RACES)
|
||||
return NULL;
|
||||
if (class_ >= MAX_CLASSES)
|
||||
return NULL;
|
||||
PlayerInfo const* info = _playerInfo[race][class_];
|
||||
if (!info)
|
||||
return NULL;
|
||||
return info;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include "Object.h"
|
||||
#include "Bag.h"
|
||||
#include "Creature.h"
|
||||
#include "Player.h"
|
||||
#include "DynamicObject.h"
|
||||
#include "GameObject.h"
|
||||
#include "Corpse.h"
|
||||
@@ -44,6 +43,11 @@
|
||||
#include <functional>
|
||||
|
||||
class Item;
|
||||
struct AccessRequirement;
|
||||
struct PlayerClassInfo;
|
||||
struct PlayerClassLevelInfo;
|
||||
struct PlayerInfo;
|
||||
struct PlayerLevelInfo;
|
||||
|
||||
// GCC have alternative #pragma pack(N) syntax and old gcc version not support pack(push, N), also any gcc version not support it at some platform
|
||||
#if defined(__GNUC__)
|
||||
@@ -598,7 +602,7 @@ class ObjectMgr
|
||||
|
||||
typedef UNORDERED_MAP<uint32, uint32> AreaTriggerScriptContainer;
|
||||
|
||||
typedef UNORDERED_MAP<uint32, AccessRequirement> AccessRequirementContainer;
|
||||
typedef UNORDERED_MAP<uint32, AccessRequirement*> AccessRequirementContainer;
|
||||
|
||||
typedef UNORDERED_MAP<uint32, RepRewardRate > RepRewardRateContainer;
|
||||
typedef UNORDERED_MAP<uint32, ReputationOnKillEntry> RepOnKillContainer;
|
||||
@@ -647,21 +651,11 @@ class ObjectMgr
|
||||
{
|
||||
if (class_ >= MAX_CLASSES)
|
||||
return NULL;
|
||||
return &_playerClassInfo[class_];
|
||||
return _playerClassInfo[class_];
|
||||
}
|
||||
void GetPlayerClassLevelInfo(uint32 class_, uint8 level, PlayerClassLevelInfo* info) const;
|
||||
|
||||
PlayerInfo const* GetPlayerInfo(uint32 race, uint32 class_) const
|
||||
{
|
||||
if (race >= MAX_RACES)
|
||||
return NULL;
|
||||
if (class_ >= MAX_CLASSES)
|
||||
return NULL;
|
||||
PlayerInfo const* info = &_playerInfo[race][class_];
|
||||
if (info->displayId_m == 0 || info->displayId_f == 0)
|
||||
return NULL;
|
||||
return info;
|
||||
}
|
||||
PlayerInfo const* GetPlayerInfo(uint32 race, uint32 class_) const;
|
||||
|
||||
void GetPlayerLevelInfo(uint32 race, uint32 class_, uint8 level, PlayerLevelInfo* info) const;
|
||||
|
||||
@@ -722,7 +716,7 @@ class ObjectMgr
|
||||
{
|
||||
AccessRequirementContainer::const_iterator itr = _accessRequirementStore.find(MAKE_PAIR32(mapid, difficulty));
|
||||
if (itr != _accessRequirementStore.end())
|
||||
return &itr->second;
|
||||
return itr->second;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -1233,11 +1227,11 @@ class ObjectMgr
|
||||
// PetLevelInfoContainer[creature_id][level]
|
||||
PetLevelInfoContainer _petInfoStore; // [creature_id][level]
|
||||
|
||||
PlayerClassInfo _playerClassInfo[MAX_CLASSES];
|
||||
PlayerClassInfo* _playerClassInfo[MAX_CLASSES];
|
||||
|
||||
void BuildPlayerLevelInfo(uint8 race, uint8 class_, uint8 level, PlayerLevelInfo* plinfo) const;
|
||||
|
||||
PlayerInfo _playerInfo[MAX_RACES][MAX_CLASSES];
|
||||
PlayerInfo* _playerInfo[MAX_RACES][MAX_CLASSES];
|
||||
|
||||
typedef std::vector<uint32> PlayerXPperLevel; // [level]
|
||||
PlayerXPperLevel _playerXPperLevel;
|
||||
|
||||
@@ -19,16 +19,14 @@
|
||||
#ifndef TRINITYCORE_GROUP_H
|
||||
#define TRINITYCORE_GROUP_H
|
||||
|
||||
#include "Battleground.h"
|
||||
#include "DBCEnums.h"
|
||||
#include "GroupRefManager.h"
|
||||
#include "LootMgr.h"
|
||||
#include "QueryResult.h"
|
||||
#include "SharedDefines.h"
|
||||
#include "Player.h"
|
||||
#include "Battlefield.h"
|
||||
#include "BattlefieldMgr.h"
|
||||
|
||||
class Battlefield;
|
||||
class Battleground;
|
||||
class Creature;
|
||||
class GroupReference;
|
||||
class InstanceSave;
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
#include "Common.h"
|
||||
#include "GroupMgr.h"
|
||||
#include "InstanceSaveMgr.h"
|
||||
#include "World.h"
|
||||
#include "DBCStores.h"
|
||||
|
||||
GroupMgr::GroupMgr()
|
||||
{
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include "ObjectMgr.h" // for normalizePlayerName
|
||||
#include "ChannelMgr.h"
|
||||
#include "Player.h"
|
||||
|
||||
void WorldSession::HandleJoinChannel(WorldPacket& recvPacket)
|
||||
{
|
||||
|
||||
@@ -772,7 +772,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder)
|
||||
|
||||
Player* pCurrChar = new Player(this);
|
||||
// for send server info and strings (config)
|
||||
ChatHandler chH = ChatHandler(pCurrChar);
|
||||
ChatHandler chH = ChatHandler(pCurrChar->GetSession());
|
||||
|
||||
// "GetAccountId() == db stored account id" checked in LoadFromDB (prevent login not own character using cheating tools)
|
||||
if (!pCurrChar->LoadFromDB(GUID_LOPART(playerGuid), holder))
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "ObjectDefines.h"
|
||||
#include "Vehicle.h"
|
||||
#include "VehicleDefines.h"
|
||||
#include "Player.h"
|
||||
|
||||
void WorldSession::HandleAttackSwingOpcode(WorldPacket& recvData)
|
||||
{
|
||||
|
||||
@@ -888,7 +888,7 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket& recvData)
|
||||
}
|
||||
|
||||
if (player->isDebugAreaTriggers)
|
||||
ChatHandler(player).PSendSysMessage(LANG_DEBUG_AREATRIGGER_REACHED, triggerId);
|
||||
ChatHandler(player->GetSession()).PSendSysMessage(LANG_DEBUG_AREATRIGGER_REACHED, triggerId);
|
||||
|
||||
if (sScriptMgr->OnAreaTrigger(player, atEntry))
|
||||
return;
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "World.h"
|
||||
#include "Group.h"
|
||||
#include "SpellInfo.h"
|
||||
#include "Player.h"
|
||||
|
||||
void WorldSession::HandleDismissCritter(WorldPacket& recvData)
|
||||
{
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "ScriptMgr.h"
|
||||
#include "GameObjectAI.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "Player.h"
|
||||
|
||||
void WorldSession::HandleClientCastFlags(WorldPacket& recvPacket, uint8 castFlags, SpellCastTargets& targets)
|
||||
{
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "SpellMgr.h"
|
||||
#include "SpellInfo.h"
|
||||
#include "Group.h"
|
||||
#include "Player.h"
|
||||
|
||||
static Rates const qualityToRate[MAX_ITEM_QUALITY] =
|
||||
{
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "LFGMgr.h"
|
||||
#include "DynamicTree.h"
|
||||
#include "Vehicle.h"
|
||||
#include "Battleground.h"
|
||||
|
||||
union u_map_magic
|
||||
{
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "InstanceSaveMgr.h"
|
||||
#include "World.h"
|
||||
#include "Group.h"
|
||||
#include "Player.h"
|
||||
|
||||
MapInstanced::MapInstanced(uint32 id, time_t expiry) : Map(id, expiry, 0, DUNGEON_DIFFICULTY_NORMAL)
|
||||
{
|
||||
@@ -280,4 +281,4 @@ bool MapInstanced::CanEnter(Player* /*player*/)
|
||||
{
|
||||
//ASSERT(false);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "Language.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "Group.h"
|
||||
#include "Player.h"
|
||||
|
||||
extern GridState* si_GridStates[]; // debugging code, should be deleted some day
|
||||
|
||||
@@ -439,4 +440,4 @@ void MapManager::FreeInstanceId(uint32 instanceId)
|
||||
SetNextInstanceId(instanceId);
|
||||
|
||||
_instanceIds[instanceId] = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "World.h"
|
||||
#include "SharedDefines.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "Player.h"
|
||||
|
||||
namespace Trinity
|
||||
{
|
||||
|
||||
@@ -3422,7 +3422,12 @@ enum ActivateTaxiReply
|
||||
ERR_TAXINOTSTANDING = 12
|
||||
};
|
||||
|
||||
// Calendar - start
|
||||
enum DuelCompleteType
|
||||
{
|
||||
DUEL_INTERRUPTED = 0,
|
||||
DUEL_WON = 1,
|
||||
DUEL_FLED = 2
|
||||
};
|
||||
|
||||
enum CalendarFlags
|
||||
{
|
||||
@@ -3521,6 +3526,73 @@ enum CalendarError
|
||||
CALENDAR_ERROR_NO_MODERATOR = 40
|
||||
};
|
||||
|
||||
// Calendar - end
|
||||
// handle the queue types and bg types separately to enable joining queue for different sized arenas at the same time
|
||||
enum BattlegroundQueueTypeId
|
||||
{
|
||||
BATTLEGROUND_QUEUE_NONE = 0,
|
||||
BATTLEGROUND_QUEUE_AV = 1,
|
||||
BATTLEGROUND_QUEUE_WS = 2,
|
||||
BATTLEGROUND_QUEUE_AB = 3,
|
||||
BATTLEGROUND_QUEUE_EY = 4,
|
||||
BATTLEGROUND_QUEUE_SA = 5,
|
||||
BATTLEGROUND_QUEUE_IC = 6,
|
||||
BATTLEGROUND_QUEUE_RB = 7,
|
||||
BATTLEGROUND_QUEUE_2v2 = 8,
|
||||
BATTLEGROUND_QUEUE_3v3 = 9,
|
||||
BATTLEGROUND_QUEUE_5v5 = 10,
|
||||
MAX_BATTLEGROUND_QUEUE_TYPES
|
||||
};
|
||||
|
||||
enum GroupJoinBattlegroundResult
|
||||
{
|
||||
// positive values are indexes in BattlemasterList.dbc
|
||||
ERR_GROUP_JOIN_BATTLEGROUND_FAIL = 0, // Your group has joined a battleground queue, but you are not eligible (showed for non existing BattlemasterList.dbc indexes)
|
||||
ERR_BATTLEGROUND_NONE = -1, // not show anything
|
||||
ERR_GROUP_JOIN_BATTLEGROUND_DESERTERS = -2, // You cannot join the battleground yet because you or one of your party members is flagged as a Deserter.
|
||||
ERR_ARENA_TEAM_PARTY_SIZE = -3, // Incorrect party size for this arena.
|
||||
ERR_BATTLEGROUND_TOO_MANY_QUEUES = -4, // You can only be queued for 2 battles at once
|
||||
ERR_BATTLEGROUND_CANNOT_QUEUE_FOR_RATED = -5, // You cannot queue for a rated match while queued for other battles
|
||||
ERR_BATTLEDGROUND_QUEUED_FOR_RATED = -6, // You cannot queue for another battle while queued for a rated arena match
|
||||
ERR_BATTLEGROUND_TEAM_LEFT_QUEUE = -7, // Your team has left the arena queue
|
||||
ERR_BATTLEGROUND_NOT_IN_BATTLEGROUND = -8, // You can't do that in a battleground.
|
||||
ERR_BATTLEGROUND_JOIN_XP_GAIN = -9, // wtf, doesn't exist in client...
|
||||
ERR_BATTLEGROUND_JOIN_RANGE_INDEX = -10, // Cannot join the queue unless all members of your party are in the same battleground level range.
|
||||
ERR_BATTLEGROUND_JOIN_TIMED_OUT = -11, // %s was unavailable to join the queue. (uint64 guid exist in client cache)
|
||||
ERR_BATTLEGROUND_JOIN_FAILED = -12, // Join as a group failed (uint64 guid doesn't exist in client cache)
|
||||
ERR_LFG_CANT_USE_BATTLEGROUND = -13, // You cannot queue for a battleground or arena while using the dungeon system.
|
||||
ERR_IN_RANDOM_BG = -14, // Can't do that while in a Random Battleground queue.
|
||||
ERR_IN_NON_RANDOM_BG = -15 // Can't queue for Random Battleground while in another Battleground queue.
|
||||
};
|
||||
|
||||
enum PetNameInvalidReason
|
||||
{
|
||||
// custom, not send
|
||||
PET_NAME_SUCCESS = 0,
|
||||
|
||||
PET_NAME_INVALID = 1,
|
||||
PET_NAME_NO_NAME = 2,
|
||||
PET_NAME_TOO_SHORT = 3,
|
||||
PET_NAME_TOO_LONG = 4,
|
||||
PET_NAME_MIXED_LANGUAGES = 6,
|
||||
PET_NAME_PROFANE = 7,
|
||||
PET_NAME_RESERVED = 8,
|
||||
PET_NAME_THREE_CONSECUTIVE = 11,
|
||||
PET_NAME_INVALID_SPACE = 12,
|
||||
PET_NAME_CONSECUTIVE_SPACES = 13,
|
||||
PET_NAME_RUSSIAN_CONSECUTIVE_SILENT_CHARACTERS = 14,
|
||||
PET_NAME_RUSSIAN_SILENT_CHARACTER_AT_BEGINNING_OR_END = 15,
|
||||
PET_NAME_DECLENSION_DOESNT_MATCH_BASE_NAME = 16
|
||||
};
|
||||
|
||||
enum DungeonStatusFlag
|
||||
{
|
||||
DUNGEON_STATUSFLAG_NORMAL = 0x01,
|
||||
DUNGEON_STATUSFLAG_HEROIC = 0x02,
|
||||
|
||||
RAID_STATUSFLAG_10MAN_NORMAL = 0x01,
|
||||
RAID_STATUSFLAG_25MAN_NORMAL = 0x02,
|
||||
RAID_STATUSFLAG_10MAN_HEROIC = 0x04,
|
||||
RAID_STATUSFLAG_25MAN_HEROIC = 0x08
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "ObjectAccessor.h"
|
||||
#include "MoveSplineInit.h"
|
||||
#include "MoveSpline.h"
|
||||
#include "Player.h"
|
||||
|
||||
#define MIN_QUIET_DISTANCE 28.0f
|
||||
#define MAX_QUIET_DISTANCE 43.0f
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "SpellScript.h"
|
||||
#include "GossipDef.h"
|
||||
#include "CreatureAI.h"
|
||||
#include "Player.h"
|
||||
|
||||
// This is the global static registry of scripts.
|
||||
template<class TScript>
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#include <ace/Atomic_Op.h>
|
||||
|
||||
#include "DBCStores.h"
|
||||
#include "Player.h"
|
||||
#include "SharedDefines.h"
|
||||
#include "World.h"
|
||||
#include "Weather.h"
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
#include "WorldSocket.h"
|
||||
#include "Common.h"
|
||||
|
||||
#include "Player.h"
|
||||
#include "Util.h"
|
||||
#include "World.h"
|
||||
#include "WorldPacket.h"
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
#include "Spell.h"
|
||||
#include "DBCStores.h"
|
||||
#include "ConditionMgr.h"
|
||||
#include "Player.h"
|
||||
#include "Battleground.h"
|
||||
|
||||
uint32 GetTargetFlagMask(SpellTargetObjectTypes objType)
|
||||
{
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "BattlegroundIC.h"
|
||||
#include "BattlefieldWG.h"
|
||||
#include "BattlefieldMgr.h"
|
||||
#include "Player.h"
|
||||
|
||||
bool IsPrimaryProfessionSkill(uint32 skill)
|
||||
{
|
||||
@@ -373,7 +374,7 @@ bool SpellMgr::IsSpellValid(SpellInfo const* spellInfo, Player* player, bool msg
|
||||
if (msg)
|
||||
{
|
||||
if (player)
|
||||
ChatHandler(player).PSendSysMessage("Craft spell %u not have create item entry.", spellInfo->Id);
|
||||
ChatHandler(player->GetSession()).PSendSysMessage("Craft spell %u not have create item entry.", spellInfo->Id);
|
||||
else
|
||||
sLog->outError(LOG_FILTER_SQL, "Craft spell %u not have create item entry.", spellInfo->Id);
|
||||
}
|
||||
@@ -387,7 +388,7 @@ bool SpellMgr::IsSpellValid(SpellInfo const* spellInfo, Player* player, bool msg
|
||||
if (msg)
|
||||
{
|
||||
if (player)
|
||||
ChatHandler(player).PSendSysMessage("Craft spell %u create not-exist in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Effects[i].ItemType);
|
||||
ChatHandler(player->GetSession()).PSendSysMessage("Craft spell %u create not-exist in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Effects[i].ItemType);
|
||||
else
|
||||
sLog->outError(LOG_FILTER_SQL, "Craft spell %u create not-exist in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Effects[i].ItemType);
|
||||
}
|
||||
@@ -405,7 +406,7 @@ bool SpellMgr::IsSpellValid(SpellInfo const* spellInfo, Player* player, bool msg
|
||||
if (msg)
|
||||
{
|
||||
if (player)
|
||||
ChatHandler(player).PSendSysMessage("Spell %u learn to broken spell %u, and then...", spellInfo->Id, spellInfo->Effects[i].TriggerSpell);
|
||||
ChatHandler(player->GetSession()).PSendSysMessage("Spell %u learn to broken spell %u, and then...", spellInfo->Id, spellInfo->Effects[i].TriggerSpell);
|
||||
else
|
||||
sLog->outError(LOG_FILTER_SQL, "Spell %u learn to invalid spell %u, and then...", spellInfo->Id, spellInfo->Effects[i].TriggerSpell);
|
||||
}
|
||||
@@ -425,7 +426,7 @@ bool SpellMgr::IsSpellValid(SpellInfo const* spellInfo, Player* player, bool msg
|
||||
if (msg)
|
||||
{
|
||||
if (player)
|
||||
ChatHandler(player).PSendSysMessage("Craft spell %u have not-exist reagent in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Reagent[j]);
|
||||
ChatHandler(player->GetSession()).PSendSysMessage("Craft spell %u have not-exist reagent in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Reagent[j]);
|
||||
else
|
||||
sLog->outError(LOG_FILTER_SQL, "Craft spell %u have not-exist reagent in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Reagent[j]);
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "WorldSession.h"
|
||||
#include "Chat.h"
|
||||
#include "World.h"
|
||||
#include "Player.h"
|
||||
|
||||
inline float GetAge(uint64 t) { return float(time(NULL) - t) / DAY; }
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "Log.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "AutoPtr.h"
|
||||
#include "Player.h"
|
||||
|
||||
namespace WeatherMgr
|
||||
{
|
||||
|
||||
@@ -25,6 +25,7 @@ EndScriptData */
|
||||
#include "ScriptMgr.h"
|
||||
#include "AccountMgr.h"
|
||||
#include "Chat.h"
|
||||
#include "Player.h"
|
||||
|
||||
class account_commandscript : public CommandScript
|
||||
{
|
||||
|
||||
@@ -24,6 +24,7 @@ EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "Chat.h"
|
||||
#include "Player.h"
|
||||
|
||||
class achievement_commandscript : public CommandScript
|
||||
{
|
||||
|
||||
@@ -27,6 +27,7 @@ EndScriptData */
|
||||
#include "AccountMgr.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Player.h"
|
||||
|
||||
class ban_commandscript : public CommandScript
|
||||
{
|
||||
|
||||
@@ -24,6 +24,7 @@ EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "Chat.h"
|
||||
#include "Player.h"
|
||||
|
||||
class cast_commandscript : public CommandScript
|
||||
{
|
||||
|
||||
@@ -27,6 +27,7 @@ EndScriptData */
|
||||
#include "AccountMgr.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "PlayerDump.h"
|
||||
#include "Player.h"
|
||||
|
||||
class character_commandscript : public CommandScript
|
||||
{
|
||||
@@ -238,11 +239,11 @@ public:
|
||||
if (handler->needReportToTarget(player))
|
||||
{
|
||||
if (oldLevel == newLevel)
|
||||
ChatHandler(player).PSendSysMessage(LANG_YOURS_LEVEL_PROGRESS_RESET, handler->GetNameLink().c_str());
|
||||
ChatHandler(player->GetSession()).PSendSysMessage(LANG_YOURS_LEVEL_PROGRESS_RESET, handler->GetNameLink().c_str());
|
||||
else if (oldLevel < newLevel)
|
||||
ChatHandler(player).PSendSysMessage(LANG_YOURS_LEVEL_UP, handler->GetNameLink().c_str(), newLevel);
|
||||
ChatHandler(player->GetSession()).PSendSysMessage(LANG_YOURS_LEVEL_UP, handler->GetNameLink().c_str(), newLevel);
|
||||
else // if (oldlevel > newlevel)
|
||||
ChatHandler(player).PSendSysMessage(LANG_YOURS_LEVEL_DOWN, handler->GetNameLink().c_str(), newLevel);
|
||||
ChatHandler(player->GetSession()).PSendSysMessage(LANG_YOURS_LEVEL_DOWN, handler->GetNameLink().c_str(), newLevel);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -25,6 +25,7 @@ EndScriptData */
|
||||
#include "ScriptMgr.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Chat.h"
|
||||
#include "Player.h"
|
||||
|
||||
class cheat_commandscript : public CommandScript
|
||||
{
|
||||
@@ -233,7 +234,7 @@ public:
|
||||
chr->SetTaxiCheater(true);
|
||||
handler->PSendSysMessage(LANG_YOU_GIVE_TAXIS, handler->GetNameLink(chr).c_str());
|
||||
if (handler->needReportToTarget(chr))
|
||||
ChatHandler(chr).PSendSysMessage(LANG_YOURS_TAXIS_ADDED, handler->GetNameLink().c_str());
|
||||
ChatHandler(chr->GetSession()).PSendSysMessage(LANG_YOURS_TAXIS_ADDED, handler->GetNameLink().c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -242,7 +243,7 @@ public:
|
||||
chr->SetTaxiCheater(false);
|
||||
handler->PSendSysMessage(LANG_YOU_REMOVE_TAXIS, handler->GetNameLink(chr).c_str());
|
||||
if (handler->needReportToTarget(chr))
|
||||
ChatHandler(chr).PSendSysMessage(LANG_YOURS_TAXIS_REMOVED, handler->GetNameLink().c_str());
|
||||
ChatHandler(chr->GetSession()).PSendSysMessage(LANG_YOURS_TAXIS_REMOVED, handler->GetNameLink().c_str());
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -271,13 +272,13 @@ public:
|
||||
{
|
||||
handler->PSendSysMessage(LANG_YOU_SET_EXPLORE_ALL, handler->GetNameLink(chr).c_str());
|
||||
if (handler->needReportToTarget(chr))
|
||||
ChatHandler(chr).PSendSysMessage(LANG_YOURS_EXPLORE_SET_ALL, handler->GetNameLink().c_str());
|
||||
ChatHandler(chr->GetSession()).PSendSysMessage(LANG_YOURS_EXPLORE_SET_ALL, handler->GetNameLink().c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_YOU_SET_EXPLORE_NOTHING, handler->GetNameLink(chr).c_str());
|
||||
if (handler->needReportToTarget(chr))
|
||||
ChatHandler(chr).PSendSysMessage(LANG_YOURS_EXPLORE_SET_NOTHING, handler->GetNameLink().c_str());
|
||||
ChatHandler(chr->GetSession()).PSendSysMessage(LANG_YOURS_EXPLORE_SET_NOTHING, handler->GetNameLink().c_str());
|
||||
}
|
||||
|
||||
for (uint8 i = 0; i < PLAYER_EXPLORED_ZONES_SIZE; ++i)
|
||||
|
||||
@@ -27,6 +27,8 @@ EndScriptData */
|
||||
#include "Chat.h"
|
||||
#include "DisableMgr.h"
|
||||
#include "OutdoorPvP.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "Player.h"
|
||||
|
||||
class disable_commandscript : public CommandScript
|
||||
{
|
||||
|
||||
@@ -25,6 +25,7 @@ EndScriptData */
|
||||
#include "ScriptMgr.h"
|
||||
#include "GameEventMgr.h"
|
||||
#include "Chat.h"
|
||||
#include "Player.h"
|
||||
|
||||
class event_commandscript : public CommandScript
|
||||
{
|
||||
|
||||
@@ -27,6 +27,7 @@ EndScriptData */
|
||||
#include "Chat.h"
|
||||
#include "AccountMgr.h"
|
||||
#include "World.h"
|
||||
#include "Player.h"
|
||||
|
||||
class gm_commandscript : public CommandScript
|
||||
{
|
||||
|
||||
@@ -27,6 +27,7 @@ EndScriptData */
|
||||
#include "MapManager.h"
|
||||
#include "TicketMgr.h"
|
||||
#include "Chat.h"
|
||||
#include "Player.h"
|
||||
|
||||
class go_commandscript : public CommandScript
|
||||
{
|
||||
|
||||
@@ -28,6 +28,7 @@ EndScriptData */
|
||||
#include "PoolMgr.h"
|
||||
#include "MapManager.h"
|
||||
#include "Chat.h"
|
||||
#include "Player.h"
|
||||
|
||||
class gobject_commandscript : public CommandScript
|
||||
{
|
||||
|
||||
@@ -25,6 +25,7 @@ EndScriptData */
|
||||
#include "ScriptMgr.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Chat.h"
|
||||
#include "Player.h"
|
||||
|
||||
class honor_commandscript : public CommandScript
|
||||
{
|
||||
|
||||
@@ -28,6 +28,7 @@ EndScriptData */
|
||||
#include "InstanceSaveMgr.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "MapManager.h"
|
||||
#include "Player.h"
|
||||
|
||||
class instance_commandscript : public CommandScript
|
||||
{
|
||||
|
||||
@@ -27,6 +27,7 @@ EndScriptData */
|
||||
#include "ObjectMgr.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "SpellInfo.h"
|
||||
#include "Player.h"
|
||||
|
||||
class learn_commandscript : public CommandScript
|
||||
{
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "Chat.h"
|
||||
#include "LFGMgr.h"
|
||||
#include "Group.h"
|
||||
#include "Player.h"
|
||||
|
||||
void GetPlayerInfo(ChatHandler* handler, Player* player)
|
||||
{
|
||||
|
||||
@@ -27,6 +27,7 @@ EndScriptData */
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Player.h"
|
||||
|
||||
class list_commandscript : public CommandScript
|
||||
{
|
||||
|
||||
@@ -28,6 +28,7 @@ EndScriptData */
|
||||
#include "GameEventMgr.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Player.h"
|
||||
|
||||
class lookup_commandscript : public CommandScript
|
||||
{
|
||||
|
||||
@@ -25,6 +25,7 @@ EndScriptData */
|
||||
#include "ScriptMgr.h"
|
||||
#include "Chat.h"
|
||||
#include "ChannelMgr.h"
|
||||
#include "Player.h"
|
||||
|
||||
class message_commandscript : public CommandScript
|
||||
{
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "TargetedMovementGenerator.h"
|
||||
#include "WeatherMgr.h"
|
||||
#include "ace/INET_Addr.h"
|
||||
#include "Player.h"
|
||||
|
||||
class misc_commandscript : public CommandScript
|
||||
{
|
||||
@@ -495,7 +496,7 @@ public:
|
||||
|
||||
handler->PSendSysMessage(LANG_SUMMONING, nameLink.c_str(), "");
|
||||
if (handler->needReportToTarget(target))
|
||||
ChatHandler(target).PSendSysMessage(LANG_SUMMONED_BY, handler->playerLink(_player->GetName()).c_str());
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_SUMMONED_BY, handler->playerLink(_player->GetName()).c_str());
|
||||
|
||||
// stop flight if need
|
||||
if (target->isInFlight())
|
||||
@@ -606,7 +607,7 @@ public:
|
||||
|
||||
handler->PSendSysMessage(LANG_SUMMONING, plNameLink.c_str(), "");
|
||||
if (handler->needReportToTarget(player))
|
||||
ChatHandler(player).PSendSysMessage(LANG_SUMMONED_BY, handler->GetNameLink().c_str());
|
||||
ChatHandler(player->GetSession()).PSendSysMessage(LANG_SUMMONED_BY, handler->GetNameLink().c_str());
|
||||
|
||||
// stop flight if need
|
||||
if (player->isInFlight())
|
||||
@@ -1804,7 +1805,7 @@ public:
|
||||
int64 muteTime = time(NULL) + notSpeakTime * MINUTE;
|
||||
target->GetSession()->m_muteTime = muteTime;
|
||||
stmt->setInt64(0, muteTime);
|
||||
ChatHandler(target).PSendSysMessage(LANG_YOUR_CHAT_DISABLED, notSpeakTime, muteReasonStr.c_str());
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOUR_CHAT_DISABLED, notSpeakTime, muteReasonStr.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1860,7 +1861,7 @@ public:
|
||||
LoginDatabase.Execute(stmt);
|
||||
|
||||
if (target)
|
||||
ChatHandler(target).PSendSysMessage(LANG_YOUR_CHAT_ENABLED);
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOUR_CHAT_ENABLED);
|
||||
|
||||
std::string nameLink = handler->playerLink(targetName);
|
||||
|
||||
@@ -2137,7 +2138,7 @@ public:
|
||||
|
||||
handler->PSendSysMessage(LANG_YOU_REPAIR_ITEMS, handler->GetNameLink(target).c_str());
|
||||
if (handler->needReportToTarget(target))
|
||||
ChatHandler(target).PSendSysMessage(LANG_YOUR_ITEMS_REPAIRED, handler->GetNameLink().c_str());
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOUR_ITEMS_REPAIRED, handler->GetNameLink().c_str());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ EndScriptData */
|
||||
#include "ScriptMgr.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Chat.h"
|
||||
#include "Player.h"
|
||||
|
||||
class modify_commandscript : public CommandScript
|
||||
{
|
||||
@@ -106,7 +107,7 @@ public:
|
||||
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_HP, handler->GetNameLink(target).c_str(), hp, hpm);
|
||||
if (handler->needReportToTarget(target))
|
||||
(ChatHandler(target)).PSendSysMessage(LANG_YOURS_HP_CHANGED, handler->GetNameLink().c_str(), hp, hpm);
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_HP_CHANGED, handler->GetNameLink().c_str(), hp, hpm);
|
||||
|
||||
target->SetMaxHealth(hpm);
|
||||
target->SetHealth(hp);
|
||||
@@ -144,7 +145,7 @@ public:
|
||||
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_MANA, handler->GetNameLink(target).c_str(), mana, manam);
|
||||
if (handler->needReportToTarget(target))
|
||||
(ChatHandler(target)).PSendSysMessage(LANG_YOURS_MANA_CHANGED, handler->GetNameLink().c_str(), mana, manam);
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_MANA_CHANGED, handler->GetNameLink().c_str(), mana, manam);
|
||||
|
||||
target->SetMaxPower(POWER_MANA, manam);
|
||||
target->SetPower(POWER_MANA, mana);
|
||||
@@ -193,7 +194,7 @@ public:
|
||||
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_ENERGY, handler->GetNameLink(target).c_str(), energy/10, energym/10);
|
||||
if (handler->needReportToTarget(target))
|
||||
(ChatHandler(target)).PSendSysMessage(LANG_YOURS_ENERGY_CHANGED, handler->GetNameLink().c_str(), energy/10, energym/10);
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_ENERGY_CHANGED, handler->GetNameLink().c_str(), energy/10, energym/10);
|
||||
|
||||
target->SetMaxPower(POWER_ENERGY, energym);
|
||||
target->SetPower(POWER_ENERGY, energy);
|
||||
@@ -244,7 +245,7 @@ public:
|
||||
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_RAGE, handler->GetNameLink(target).c_str(), rage/10, ragem/10);
|
||||
if (handler->needReportToTarget(target))
|
||||
(ChatHandler(target)).PSendSysMessage(LANG_YOURS_RAGE_CHANGED, handler->GetNameLink().c_str(), rage/10, ragem/10);
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_RAGE_CHANGED, handler->GetNameLink().c_str(), rage/10, ragem/10);
|
||||
|
||||
target->SetMaxPower(POWER_RAGE, ragem);
|
||||
target->SetPower(POWER_RAGE, rage);
|
||||
@@ -278,7 +279,7 @@ public:
|
||||
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_RUNIC_POWER, handler->GetNameLink(target).c_str(), rune/10, runem/10);
|
||||
if (handler->needReportToTarget(target))
|
||||
(ChatHandler(target)).PSendSysMessage(LANG_YOURS_RUNIC_POWER_CHANGED, handler->GetNameLink().c_str(), rune/10, runem/10);
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_RUNIC_POWER_CHANGED, handler->GetNameLink().c_str(), rune/10, runem/10);
|
||||
|
||||
target->SetMaxPower(POWER_RUNIC_POWER, runem);
|
||||
target->SetPower(POWER_RUNIC_POWER, rune);
|
||||
@@ -408,7 +409,7 @@ public:
|
||||
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_SPELLFLATID, spellflatid, val, mark, handler->GetNameLink(target).c_str());
|
||||
if (handler->needReportToTarget(target))
|
||||
(ChatHandler(target)).PSendSysMessage(LANG_YOURS_SPELLFLATID_CHANGED, handler->GetNameLink().c_str(), spellflatid, val, mark);
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_SPELLFLATID_CHANGED, handler->GetNameLink().c_str(), spellflatid, val, mark);
|
||||
|
||||
WorldPacket data(SMSG_SET_FLAT_SPELL_MODIFIER, (1+1+2+2));
|
||||
data << uint8(spellflatid);
|
||||
@@ -504,7 +505,7 @@ public:
|
||||
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_ASPEED, ASpeed, targetNameLink.c_str());
|
||||
if (handler->needReportToTarget(target))
|
||||
(ChatHandler(target)).PSendSysMessage(LANG_YOURS_ASPEED_CHANGED, handler->GetNameLink().c_str(), ASpeed);
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_ASPEED_CHANGED, handler->GetNameLink().c_str(), ASpeed);
|
||||
|
||||
target->SetSpeed(MOVE_WALK, ASpeed, true);
|
||||
target->SetSpeed(MOVE_RUN, ASpeed, true);
|
||||
@@ -552,7 +553,7 @@ public:
|
||||
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_SPEED, Speed, targetNameLink.c_str());
|
||||
if (handler->needReportToTarget(target))
|
||||
(ChatHandler(target)).PSendSysMessage(LANG_YOURS_SPEED_CHANGED, handler->GetNameLink().c_str(), Speed);
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_SPEED_CHANGED, handler->GetNameLink().c_str(), Speed);
|
||||
|
||||
target->SetSpeed(MOVE_RUN, Speed, true);
|
||||
|
||||
@@ -597,7 +598,7 @@ public:
|
||||
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_SWIM_SPEED, Swim, targetNameLink.c_str());
|
||||
if (handler->needReportToTarget(target))
|
||||
(ChatHandler(target)).PSendSysMessage(LANG_YOURS_SWIM_SPEED_CHANGED, handler->GetNameLink().c_str(), Swim);
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_SWIM_SPEED_CHANGED, handler->GetNameLink().c_str(), Swim);
|
||||
|
||||
target->SetSpeed(MOVE_SWIM, Swim, true);
|
||||
|
||||
@@ -642,7 +643,7 @@ public:
|
||||
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_BACK_SPEED, BSpeed, targetNameLink.c_str());
|
||||
if (handler->needReportToTarget(target))
|
||||
(ChatHandler(target)).PSendSysMessage(LANG_YOURS_BACK_SPEED_CHANGED, handler->GetNameLink().c_str(), BSpeed);
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_BACK_SPEED_CHANGED, handler->GetNameLink().c_str(), BSpeed);
|
||||
|
||||
target->SetSpeed(MOVE_RUN_BACK, BSpeed, true);
|
||||
|
||||
@@ -678,7 +679,7 @@ public:
|
||||
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_FLY_SPEED, FSpeed, handler->GetNameLink(target).c_str());
|
||||
if (handler->needReportToTarget(target))
|
||||
(ChatHandler(target)).PSendSysMessage(LANG_YOURS_FLY_SPEED_CHANGED, handler->GetNameLink().c_str(), FSpeed);
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_FLY_SPEED_CHANGED, handler->GetNameLink().c_str(), FSpeed);
|
||||
|
||||
target->SetSpeed(MOVE_FLIGHT, FSpeed, true);
|
||||
|
||||
@@ -715,7 +716,7 @@ public:
|
||||
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_SIZE, Scale, handler->GetNameLink(player).c_str());
|
||||
if (handler->needReportToTarget(player))
|
||||
(ChatHandler(player)).PSendSysMessage(LANG_YOURS_SIZE_CHANGED, handler->GetNameLink().c_str(), Scale);
|
||||
ChatHandler(player->GetSession()).PSendSysMessage(LANG_YOURS_SIZE_CHANGED, handler->GetNameLink().c_str(), Scale);
|
||||
}
|
||||
|
||||
target->SetObjectScale(Scale);
|
||||
@@ -963,7 +964,7 @@ public:
|
||||
|
||||
handler->PSendSysMessage(LANG_YOU_GIVE_MOUNT, handler->GetNameLink(target).c_str());
|
||||
if (handler->needReportToTarget(target))
|
||||
(ChatHandler(target)).PSendSysMessage(LANG_MOUNT_GIVED, handler->GetNameLink().c_str());
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_MOUNT_GIVED, handler->GetNameLink().c_str());
|
||||
|
||||
target->SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP);
|
||||
target->Mount(mId);
|
||||
@@ -1019,7 +1020,7 @@ public:
|
||||
{
|
||||
handler->PSendSysMessage(LANG_YOU_TAKE_ALL_MONEY, handler->GetNameLink(target).c_str());
|
||||
if (handler->needReportToTarget(target))
|
||||
(ChatHandler(target)).PSendSysMessage(LANG_YOURS_ALL_MONEY_GONE, handler->GetNameLink().c_str());
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_ALL_MONEY_GONE, handler->GetNameLink().c_str());
|
||||
|
||||
target->SetMoney(0);
|
||||
}
|
||||
@@ -1030,7 +1031,7 @@ public:
|
||||
|
||||
handler->PSendSysMessage(LANG_YOU_TAKE_MONEY, abs(moneyToAdd), handler->GetNameLink(target).c_str());
|
||||
if (handler->needReportToTarget(target))
|
||||
(ChatHandler(target)).PSendSysMessage(LANG_YOURS_MONEY_TAKEN, handler->GetNameLink().c_str(), abs(moneyToAdd));
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_MONEY_TAKEN, handler->GetNameLink().c_str(), abs(moneyToAdd));
|
||||
target->SetMoney(newmoney);
|
||||
}
|
||||
}
|
||||
@@ -1038,7 +1039,7 @@ public:
|
||||
{
|
||||
handler->PSendSysMessage(LANG_YOU_GIVE_MONEY, moneyToAdd, handler->GetNameLink(target).c_str());
|
||||
if (handler->needReportToTarget(target))
|
||||
(ChatHandler(target)).PSendSysMessage(LANG_YOURS_MONEY_GIVEN, handler->GetNameLink().c_str(), moneyToAdd);
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_MONEY_GIVEN, handler->GetNameLink().c_str(), moneyToAdd);
|
||||
|
||||
if (moneyToAdd >= MAX_MONEY_AMOUNT)
|
||||
target->SetMoney(MAX_MONEY_AMOUNT);
|
||||
@@ -1378,7 +1379,7 @@ public:
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_GENDER, handler->GetNameLink(target).c_str(), gender_full);
|
||||
|
||||
if (handler->needReportToTarget(target))
|
||||
(ChatHandler(target)).PSendSysMessage(LANG_YOUR_GENDER_CHANGED, gender_full, handler->GetNameLink().c_str());
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOUR_GENDER_CHANGED, gender_full, handler->GetNameLink().c_str());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ EndScriptData */
|
||||
#include "CreatureGroups.h"
|
||||
#include "TargetedMovementGenerator.h" // for HandleNpcUnFollowCommand
|
||||
#include "CreatureAI.h"
|
||||
#include "Player.h"
|
||||
|
||||
class npc_commandscript : public CommandScript
|
||||
{
|
||||
|
||||
@@ -25,6 +25,7 @@ EndScriptData */
|
||||
#include "ScriptMgr.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Chat.h"
|
||||
#include "Player.h"
|
||||
|
||||
class quest_commandscript : public CommandScript
|
||||
{
|
||||
|
||||
@@ -25,6 +25,7 @@ EndScriptData */
|
||||
#include "ScriptMgr.h"
|
||||
#include "Chat.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "Player.h"
|
||||
|
||||
class reset_commandscript : public CommandScript
|
||||
{
|
||||
@@ -168,7 +169,7 @@ public:
|
||||
{
|
||||
target->resetSpells(/* bool myClassOnly */);
|
||||
|
||||
ChatHandler(target).SendSysMessage(LANG_RESET_SPELLS);
|
||||
ChatHandler(target->GetSession()).SendSysMessage(LANG_RESET_SPELLS);
|
||||
if (!handler->GetSession() || handler->GetSession()->GetPlayer() != target)
|
||||
handler->PSendSysMessage(LANG_RESET_SPELLS_ONLINE, handler->GetNameLink(target).c_str());
|
||||
}
|
||||
@@ -220,7 +221,7 @@ public:
|
||||
creature->ToPet()->resetTalents();
|
||||
owner->ToPlayer()->SendTalentsInfoData(true);
|
||||
|
||||
ChatHandler(owner->ToPlayer()).SendSysMessage(LANG_RESET_PET_TALENTS);
|
||||
ChatHandler(owner->ToPlayer()->GetSession()).SendSysMessage(LANG_RESET_PET_TALENTS);
|
||||
if (!handler->GetSession() || handler->GetSession()->GetPlayer() != owner->ToPlayer())
|
||||
handler->PSendSysMessage(LANG_RESET_PET_TALENTS_ONLINE, handler->GetNameLink(owner->ToPlayer()).c_str());
|
||||
}
|
||||
@@ -236,7 +237,7 @@ public:
|
||||
{
|
||||
target->resetTalents(true);
|
||||
target->SendTalentsInfoData(false);
|
||||
ChatHandler(target).SendSysMessage(LANG_RESET_TALENTS);
|
||||
ChatHandler(target->GetSession()).SendSysMessage(LANG_RESET_TALENTS);
|
||||
if (!handler->GetSession() || handler->GetSession()->GetPlayer() != target)
|
||||
handler->PSendSysMessage(LANG_RESET_TALENTS_ONLINE, handler->GetNameLink(target).c_str());
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ EndScriptData */
|
||||
#include "SystemConfig.h"
|
||||
#include "Config.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "Player.h"
|
||||
|
||||
class server_commandscript : public CommandScript
|
||||
{
|
||||
|
||||
@@ -27,6 +27,7 @@ EndScriptData */
|
||||
#include "MapManager.h"
|
||||
#include "Chat.h"
|
||||
#include "Group.h"
|
||||
#include "Player.h"
|
||||
|
||||
class tele_commandscript : public CommandScript
|
||||
{
|
||||
@@ -178,7 +179,7 @@ public:
|
||||
|
||||
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());
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_TELEPORTED_TO_BY, handler->GetNameLink().c_str());
|
||||
|
||||
// stop flight if need
|
||||
if (target->isInFlight())
|
||||
@@ -274,7 +275,7 @@ public:
|
||||
|
||||
handler->PSendSysMessage(LANG_TELEPORTING_TO, plNameLink.c_str(), "", tele->name.c_str());
|
||||
if (handler->needReportToTarget(player))
|
||||
(ChatHandler(player)).PSendSysMessage(LANG_TELEPORTED_TO_BY, nameLink.c_str());
|
||||
ChatHandler(player->GetSession()).PSendSysMessage(LANG_TELEPORTED_TO_BY, nameLink.c_str());
|
||||
|
||||
// stop flight if need
|
||||
if (player->isInFlight())
|
||||
|
||||
@@ -27,6 +27,7 @@ EndScriptData */
|
||||
#include "AccountMgr.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "TicketMgr.h"
|
||||
#include "Player.h"
|
||||
|
||||
class ticket_commandscript : public CommandScript
|
||||
{
|
||||
|
||||
@@ -25,6 +25,7 @@ EndScriptData */
|
||||
#include "ScriptMgr.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Chat.h"
|
||||
#include "Player.h"
|
||||
|
||||
class titles_commandscript : public CommandScript
|
||||
{
|
||||
|
||||
@@ -26,6 +26,7 @@ EndScriptData */
|
||||
#include "ObjectMgr.h"
|
||||
#include "WaypointManager.h"
|
||||
#include "Chat.h"
|
||||
#include "Player.h"
|
||||
|
||||
class wp_commandscript : public CommandScript
|
||||
{
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "ScriptedEscortAI.h"
|
||||
#include "ScriptedGossip.h"
|
||||
#include "blackrock_depths.h"
|
||||
#include "Player.h"
|
||||
|
||||
//go_shadowforge_brazier
|
||||
class go_shadowforge_brazier : public GameObjectScript
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptedGossip.h"
|
||||
#include "blackrock_depths.h"
|
||||
#include "Player.h"
|
||||
|
||||
enum Spells
|
||||
{
|
||||
|
||||
@@ -26,6 +26,7 @@ EndScriptData */
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptedGossip.h"
|
||||
#include "Player.h"
|
||||
|
||||
enum Says
|
||||
{
|
||||
|
||||
@@ -26,6 +26,7 @@ EndScriptData */
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptedGossip.h"
|
||||
#include "Player.h"
|
||||
|
||||
enum Says
|
||||
{
|
||||
|
||||
@@ -27,6 +27,7 @@ EndScriptData */
|
||||
#include "ScriptedCreature.h"
|
||||
#include "deadmines.h"
|
||||
#include "Spell.h"
|
||||
#include "Player.h"
|
||||
|
||||
/*#####
|
||||
# item_Defias_Gunpowder
|
||||
|
||||
@@ -26,6 +26,7 @@ EndScriptData */
|
||||
#include "ScriptMgr.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "deadmines.h"
|
||||
#include "TemporarySummon.h"
|
||||
|
||||
enum Sounds
|
||||
{
|
||||
|
||||
@@ -27,6 +27,7 @@ Script Data End */
|
||||
#include "ScriptedGossip.h"
|
||||
#include "gnomeregan.h"
|
||||
#include "ScriptedEscortAI.h"
|
||||
#include "Player.h"
|
||||
|
||||
#define GOSSIP_START_EVENT "I am ready to being"
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "ScriptMgr.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "gnomeregan.h"
|
||||
#include "Player.h"
|
||||
|
||||
#define MAX_ENCOUNTER 1
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ EndScriptData */
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "karazhan.h"
|
||||
#include "Player.h"
|
||||
|
||||
#define EMOTE_PHASE_PORTAL -1532089
|
||||
#define EMOTE_PHASE_BANISH -1532090
|
||||
|
||||
@@ -27,6 +27,7 @@ EndScriptData */
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptedGossip.h"
|
||||
#include "karazhan.h"
|
||||
#include "Player.h"
|
||||
|
||||
/***********************************/
|
||||
/*** OPERA WIZARD OF OZ EVENT *****/
|
||||
|
||||
@@ -34,6 +34,7 @@ EndContentData */
|
||||
#include "ScriptedGossip.h"
|
||||
#include "karazhan.h"
|
||||
#include "ScriptedEscortAI.h"
|
||||
#include "Player.h"
|
||||
|
||||
/*######
|
||||
# npc_barnesAI
|
||||
|
||||
@@ -30,6 +30,7 @@ EndContentData */
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptedGossip.h"
|
||||
#include "Player.h"
|
||||
|
||||
/*######
|
||||
## npc_kalecgos
|
||||
|
||||
@@ -28,6 +28,7 @@ EndScriptData */
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptedGossip.h"
|
||||
#include "molten_core.h"
|
||||
#include "Player.h"
|
||||
|
||||
enum Texts
|
||||
{
|
||||
|
||||
@@ -28,6 +28,7 @@ EndScriptData */
|
||||
#include "InstanceScript.h"
|
||||
#include "CreatureAI.h"
|
||||
#include "molten_core.h"
|
||||
#include "TemporarySummon.h"
|
||||
|
||||
Position const SummonPositions[10] =
|
||||
{
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "ScriptedEscortAI.h"
|
||||
#include "CombatAI.h"
|
||||
#include "PassiveAI.h"
|
||||
#include "Player.h"
|
||||
|
||||
/*######
|
||||
##Quest 12848
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptedEscortAI.h"
|
||||
#include "Player.h"
|
||||
|
||||
//How to win friends and influence enemies
|
||||
// texts signed for creature 28939 but used for 28939, 28940, 28610
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptedGossip.h"
|
||||
#include "ScriptedEscortAI.h"
|
||||
#include "Player.h"
|
||||
|
||||
#define LESS_MOB // if you do not have a good server and do not want it to be laggy as hell
|
||||
//Light of Dawn
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user