Core: Remove Player.h dependency from all the possible headers
This commit is contained in:
1 parent
d55771267a
commit
b99c347747
293 files changed
+567
-260
No files matched your search
@@ -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
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user