mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
Cleanup Operator padding
This commit is contained in:
parent
9141299127
commit
e32b9953a1
264 changed files with 6715 additions and 6715 deletions
|
|
@ -127,7 +127,7 @@ bool ChatHandler::HandleAnnounceCommand(char* args)
|
|||
if (!*args)
|
||||
return false;
|
||||
|
||||
sWorld.SendWorldText(LANG_SYSTEMMESSAGE,args);
|
||||
sWorld.SendWorldText(LANG_SYSTEMMESSAGE, args);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -140,7 +140,7 @@ bool ChatHandler::HandleNotifyCommand(char* args)
|
|||
std::string str = GetMangosString(LANG_GLOBAL_NOTIFY);
|
||||
str += args;
|
||||
|
||||
WorldPacket data(SMSG_NOTIFICATION, (str.size()+1));
|
||||
WorldPacket data(SMSG_NOTIFICATION, (str.size() + 1));
|
||||
data << str;
|
||||
sWorld.SendGlobalMessage(&data);
|
||||
|
||||
|
|
@ -285,7 +285,7 @@ bool ChatHandler::HandleGPSCommand(char* args)
|
|||
Cell cell(cell_val);
|
||||
|
||||
uint32 zone_id, area_id;
|
||||
obj->GetZoneAndAreaId(zone_id,area_id);
|
||||
obj->GetZoneAndAreaId(zone_id, area_id);
|
||||
|
||||
MapEntry const* mapEntry = sMapStore.LookupEntry(obj->GetMapId());
|
||||
AreaTableEntry const* zoneEntry = GetAreaEntryByAreaID(zone_id);
|
||||
|
|
@ -306,11 +306,11 @@ bool ChatHandler::HandleGPSCommand(char* args)
|
|||
|
||||
GridPair p = MaNGOS::ComputeGridPair(obj->GetPositionX(), obj->GetPositionY());
|
||||
|
||||
int gx=63-p.x_coord;
|
||||
int gy=63-p.y_coord;
|
||||
int gx = 63 - p.x_coord;
|
||||
int gy = 63 - p.y_coord;
|
||||
|
||||
uint32 have_map = GridMap::ExistMap(obj->GetMapId(),gx,gy) ? 1 : 0;
|
||||
uint32 have_vmap = GridMap::ExistVMap(obj->GetMapId(),gx,gy) ? 1 : 0;
|
||||
uint32 have_map = GridMap::ExistMap(obj->GetMapId(), gx, gy) ? 1 : 0;
|
||||
uint32 have_vmap = GridMap::ExistVMap(obj->GetMapId(), gx, gy) ? 1 : 0;
|
||||
|
||||
if (have_vmap)
|
||||
{
|
||||
|
|
@ -333,7 +333,7 @@ bool ChatHandler::HandleGPSCommand(char* args)
|
|||
DEBUG_LOG("Player %s GPS call for %s '%s' (%s: %u):",
|
||||
m_session ? GetNameLink().c_str() : GetMangosString(LANG_CONSOLE_COMMAND),
|
||||
(obj->GetTypeId() == TYPEID_PLAYER ? "player" : "creature"), obj->GetName(),
|
||||
(obj->GetTypeId() == TYPEID_PLAYER ? "GUID" : "Entry"), (obj->GetTypeId() == TYPEID_PLAYER ? obj->GetGUIDLow(): obj->GetEntry()));
|
||||
(obj->GetTypeId() == TYPEID_PLAYER ? "GUID" : "Entry"), (obj->GetTypeId() == TYPEID_PLAYER ? obj->GetGUIDLow() : obj->GetEntry()));
|
||||
|
||||
DEBUG_LOG(GetMangosString(LANG_MAP_POSITION),
|
||||
obj->GetMapId(), (mapEntry ? mapEntry->name[sWorld.GetDefaultDbcLocale()] : "<unknown>"),
|
||||
|
|
@ -391,14 +391,14 @@ bool ChatHandler::HandleNamegoCommand(char* args)
|
|||
// only allow if gm mode is on
|
||||
if (!target->isGameMaster())
|
||||
{
|
||||
PSendSysMessage(LANG_CANNOT_GO_TO_BG_GM,nameLink.c_str());
|
||||
PSendSysMessage(LANG_CANNOT_GO_TO_BG_GM, nameLink.c_str());
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
// if both players are in different bgs
|
||||
else if (target->GetBattleGroundId() && m_session->GetPlayer()->GetBattleGroundId() != target->GetBattleGroundId())
|
||||
{
|
||||
PSendSysMessage(LANG_CANNOT_GO_TO_BG_FROM_BG,nameLink.c_str());
|
||||
PSendSysMessage(LANG_CANNOT_GO_TO_BG_FROM_BG, nameLink.c_str());
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
|
@ -415,7 +415,7 @@ bool ChatHandler::HandleNamegoCommand(char* args)
|
|||
if (cMap->Instanceable() && cMap->GetInstanceId() != pMap->GetInstanceId())
|
||||
{
|
||||
// cannot summon from instance to instance
|
||||
PSendSysMessage(LANG_CANNOT_SUMMON_TO_INST,nameLink.c_str());
|
||||
PSendSysMessage(LANG_CANNOT_SUMMON_TO_INST, nameLink.c_str());
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
|
@ -426,13 +426,13 @@ bool ChatHandler::HandleNamegoCommand(char* args)
|
|||
(m_session->GetPlayer()->GetGroup()->GetLeaderGuid() != m_session->GetPlayer()->GetObjectGuid()))
|
||||
// the last check is a bit excessive, but let it be, just in case
|
||||
{
|
||||
PSendSysMessage(LANG_CANNOT_SUMMON_TO_INST,nameLink.c_str());
|
||||
PSendSysMessage(LANG_CANNOT_SUMMON_TO_INST, nameLink.c_str());
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
PSendSysMessage(LANG_SUMMONING, nameLink.c_str(),"");
|
||||
PSendSysMessage(LANG_SUMMONING, nameLink.c_str(), "");
|
||||
if (needReportToTarget(target))
|
||||
ChatHandler(target).PSendSysMessage(LANG_SUMMONED_BY, playerLink(_player->GetName()).c_str());
|
||||
|
||||
|
|
@ -447,9 +447,9 @@ bool ChatHandler::HandleNamegoCommand(char* args)
|
|||
target->SaveRecallPosition();
|
||||
|
||||
// before GM
|
||||
float x,y,z;
|
||||
float x, y, z;
|
||||
m_session->GetPlayer()->GetClosePoint(x, y, z, target->GetObjectBoundingRadius());
|
||||
target->TeleportTo(m_session->GetPlayer()->GetMapId(),x,y,z,target->GetOrientation());
|
||||
target->TeleportTo(m_session->GetPlayer()->GetMapId(), x, y, z, target->GetOrientation());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -459,7 +459,7 @@ bool ChatHandler::HandleNamegoCommand(char* args)
|
|||
|
||||
std::string nameLink = playerLink(target_name);
|
||||
|
||||
PSendSysMessage(LANG_SUMMONING, nameLink.c_str(),GetMangosString(LANG_OFFLINE));
|
||||
PSendSysMessage(LANG_SUMMONING, nameLink.c_str(), GetMangosString(LANG_OFFLINE));
|
||||
|
||||
// in point where GM stay
|
||||
Player::SavePositionInDB(target_guid, m_session->GetPlayer()->GetMapId(),
|
||||
|
|
@ -505,14 +505,14 @@ bool ChatHandler::HandleGonameCommand(char* args)
|
|||
// only allow if gm mode is on
|
||||
if (!_player->isGameMaster())
|
||||
{
|
||||
PSendSysMessage(LANG_CANNOT_GO_TO_BG_GM,chrNameLink.c_str());
|
||||
PSendSysMessage(LANG_CANNOT_GO_TO_BG_GM, chrNameLink.c_str());
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
// if both players are in different bgs
|
||||
else if (_player->GetBattleGroundId() && _player->GetBattleGroundId() != target->GetBattleGroundId())
|
||||
{
|
||||
PSendSysMessage(LANG_CANNOT_GO_TO_BG_FROM_BG,chrNameLink.c_str());
|
||||
PSendSysMessage(LANG_CANNOT_GO_TO_BG_FROM_BG, chrNameLink.c_str());
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
|
@ -533,7 +533,7 @@ bool ChatHandler::HandleGonameCommand(char* args)
|
|||
// we are in group, we can go only if we are in the player group
|
||||
if (_player->GetGroup() != target->GetGroup())
|
||||
{
|
||||
PSendSysMessage(LANG_CANNOT_GO_TO_INST_PARTY,chrNameLink.c_str());
|
||||
PSendSysMessage(LANG_CANNOT_GO_TO_INST_PARTY, chrNameLink.c_str());
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
|
@ -543,7 +543,7 @@ bool ChatHandler::HandleGonameCommand(char* args)
|
|||
// we are not in group, let's verify our GM mode
|
||||
if (!_player->isGameMaster())
|
||||
{
|
||||
PSendSysMessage(LANG_CANNOT_GO_TO_INST_GM,chrNameLink.c_str());
|
||||
PSendSysMessage(LANG_CANNOT_GO_TO_INST_GM, chrNameLink.c_str());
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
|
@ -591,8 +591,8 @@ bool ChatHandler::HandleGonameCommand(char* args)
|
|||
_player->SaveRecallPosition();
|
||||
|
||||
// to point to see at target with same orientation
|
||||
float x,y,z;
|
||||
target->GetContactPoint(_player,x,y,z);
|
||||
float x, y, z;
|
||||
target->GetContactPoint(_player, x, y, z);
|
||||
|
||||
_player->TeleportTo(target->GetMapId(), x, y, z, _player->GetAngle(target), TELE_TO_GM_MODE);
|
||||
}
|
||||
|
|
@ -607,10 +607,10 @@ bool ChatHandler::HandleGonameCommand(char* args)
|
|||
PSendSysMessage(LANG_APPEARING_AT, nameLink.c_str());
|
||||
|
||||
// to point where player stay (if loaded)
|
||||
float x,y,z,o;
|
||||
float x, y, z, o;
|
||||
uint32 map;
|
||||
bool in_flight;
|
||||
if (!Player::LoadPositionFromDB(target_guid, map,x,y,z,o,in_flight))
|
||||
if (!Player::LoadPositionFromDB(target_guid, map, x, y, z, o, in_flight))
|
||||
return false;
|
||||
|
||||
return HandleGoHelper(_player, map, x, y, &z);
|
||||
|
|
@ -710,7 +710,7 @@ bool ChatHandler::HandleModifyManaCommand(char* args)
|
|||
if (needReportToTarget(chr))
|
||||
ChatHandler(chr).PSendSysMessage(LANG_YOURS_MANA_CHANGED, GetNameLink().c_str(), mana, manam);
|
||||
|
||||
chr->SetMaxPower(POWER_MANA,manam);
|
||||
chr->SetMaxPower(POWER_MANA, manam);
|
||||
chr->SetPower(POWER_MANA, mana);
|
||||
|
||||
return true;
|
||||
|
|
@ -722,8 +722,8 @@ bool ChatHandler::HandleModifyEnergyCommand(char* args)
|
|||
if (!*args)
|
||||
return false;
|
||||
|
||||
int32 energy = atoi(args)*10;
|
||||
int32 energym = atoi(args)*10;
|
||||
int32 energy = atoi(args) * 10;
|
||||
int32 energym = atoi(args) * 10;
|
||||
|
||||
if (energy <= 0 || energym <= 0 || energym < energy)
|
||||
{
|
||||
|
|
@ -744,14 +744,14 @@ bool ChatHandler::HandleModifyEnergyCommand(char* args)
|
|||
if (HasLowerSecurity(chr))
|
||||
return false;
|
||||
|
||||
PSendSysMessage(LANG_YOU_CHANGE_ENERGY, GetNameLink(chr).c_str(), energy/10, energym/10);
|
||||
PSendSysMessage(LANG_YOU_CHANGE_ENERGY, GetNameLink(chr).c_str(), energy / 10, energym / 10);
|
||||
if (needReportToTarget(chr))
|
||||
ChatHandler(chr).PSendSysMessage(LANG_YOURS_ENERGY_CHANGED, GetNameLink().c_str(), energy/10, energym/10);
|
||||
ChatHandler(chr).PSendSysMessage(LANG_YOURS_ENERGY_CHANGED, GetNameLink().c_str(), energy / 10, energym / 10);
|
||||
|
||||
chr->SetMaxPower(POWER_ENERGY,energym);
|
||||
chr->SetMaxPower(POWER_ENERGY, energym);
|
||||
chr->SetPower(POWER_ENERGY, energy);
|
||||
|
||||
DETAIL_LOG(GetMangosString(LANG_CURRENT_ENERGY),chr->GetMaxPower(POWER_ENERGY));
|
||||
DETAIL_LOG(GetMangosString(LANG_CURRENT_ENERGY), chr->GetMaxPower(POWER_ENERGY));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -762,8 +762,8 @@ bool ChatHandler::HandleModifyRageCommand(char* args)
|
|||
if (!*args)
|
||||
return false;
|
||||
|
||||
int32 rage = atoi(args)*10;
|
||||
int32 ragem = atoi(args)*10;
|
||||
int32 rage = atoi(args) * 10;
|
||||
int32 ragem = atoi(args) * 10;
|
||||
|
||||
if (rage <= 0 || ragem <= 0 || ragem < rage)
|
||||
{
|
||||
|
|
@ -784,11 +784,11 @@ bool ChatHandler::HandleModifyRageCommand(char* args)
|
|||
if (HasLowerSecurity(chr))
|
||||
return false;
|
||||
|
||||
PSendSysMessage(LANG_YOU_CHANGE_RAGE, GetNameLink(chr).c_str(), rage/10, ragem/10);
|
||||
PSendSysMessage(LANG_YOU_CHANGE_RAGE, GetNameLink(chr).c_str(), rage / 10, ragem / 10);
|
||||
if (needReportToTarget(chr))
|
||||
ChatHandler(chr).PSendSysMessage(LANG_YOURS_RAGE_CHANGED, GetNameLink().c_str(), rage/10, ragem/10);
|
||||
ChatHandler(chr).PSendSysMessage(LANG_YOURS_RAGE_CHANGED, GetNameLink().c_str(), rage / 10, ragem / 10);
|
||||
|
||||
chr->SetMaxPower(POWER_RAGE,ragem);
|
||||
chr->SetMaxPower(POWER_RAGE, ragem);
|
||||
chr->SetPower(POWER_RAGE, rage);
|
||||
|
||||
return true;
|
||||
|
|
@ -800,8 +800,8 @@ bool ChatHandler::HandleModifyRunicPowerCommand(char* args)
|
|||
if (!*args)
|
||||
return false;
|
||||
|
||||
int32 rune = atoi(args)*10;
|
||||
int32 runem = atoi(args)*10;
|
||||
int32 rune = atoi(args) * 10;
|
||||
int32 runem = atoi(args) * 10;
|
||||
|
||||
if (rune <= 0 || runem <= 0 || runem < rune)
|
||||
{
|
||||
|
|
@ -818,11 +818,11 @@ bool ChatHandler::HandleModifyRunicPowerCommand(char* args)
|
|||
return false;
|
||||
}
|
||||
|
||||
PSendSysMessage(LANG_YOU_CHANGE_RUNIC_POWER, GetNameLink(chr).c_str(), rune/10, runem/10);
|
||||
PSendSysMessage(LANG_YOU_CHANGE_RUNIC_POWER, GetNameLink(chr).c_str(), rune / 10, runem / 10);
|
||||
if (needReportToTarget(chr))
|
||||
ChatHandler(chr).PSendSysMessage(LANG_YOURS_RUNIC_POWER_CHANGED, GetNameLink().c_str(), rune/10, runem/10);
|
||||
ChatHandler(chr).PSendSysMessage(LANG_YOURS_RUNIC_POWER_CHANGED, GetNameLink().c_str(), rune / 10, runem / 10);
|
||||
|
||||
chr->SetMaxPower(POWER_RUNIC_POWER,runem);
|
||||
chr->SetMaxPower(POWER_RUNIC_POWER, runem);
|
||||
chr->SetPower(POWER_RUNIC_POWER, rune);
|
||||
|
||||
return true;
|
||||
|
|
@ -847,7 +847,7 @@ bool ChatHandler::HandleModifyFactionCommand(char* args)
|
|||
uint32 flag = chr->GetUInt32Value(UNIT_FIELD_FLAGS);
|
||||
uint32 npcflag = chr->GetUInt32Value(UNIT_NPC_FLAGS);
|
||||
uint32 dyflag = chr->GetUInt32Value(UNIT_DYNAMIC_FLAGS);
|
||||
PSendSysMessage(LANG_CURRENT_FACTION,chr->GetGUIDLow(),factionid,flag,npcflag,dyflag);
|
||||
PSendSysMessage(LANG_CURRENT_FACTION, chr->GetGUIDLow(), factionid, flag, npcflag, dyflag);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
@ -885,9 +885,9 @@ bool ChatHandler::HandleModifyFactionCommand(char* args)
|
|||
PSendSysMessage(LANG_YOU_CHANGE_FACTION, chr->GetGUIDLow(), factionid, flag, npcflag, dyflag);
|
||||
|
||||
chr->setFaction(factionid);
|
||||
chr->SetUInt32Value(UNIT_FIELD_FLAGS,flag);
|
||||
chr->SetUInt32Value(UNIT_NPC_FLAGS,npcflag);
|
||||
chr->SetUInt32Value(UNIT_DYNAMIC_FLAGS,dyflag);
|
||||
chr->SetUInt32Value(UNIT_FIELD_FLAGS, flag);
|
||||
chr->SetUInt32Value(UNIT_NPC_FLAGS, npcflag);
|
||||
chr->SetUInt32Value(UNIT_DYNAMIC_FLAGS, dyflag);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -910,7 +910,7 @@ bool ChatHandler::HandleModifyTalentCommand(char* args)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (target->GetTypeId()==TYPEID_PLAYER)
|
||||
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
// check online security
|
||||
if (HasLowerSecurity((Player*)target))
|
||||
|
|
@ -953,7 +953,7 @@ bool ChatHandler::HandleTaxiCheatCommand(char* args)
|
|||
|
||||
Player* chr = getSelectedPlayer();
|
||||
if (!chr)
|
||||
chr=m_session->GetPlayer();
|
||||
chr = m_session->GetPlayer();
|
||||
// check online security
|
||||
else if (HasLowerSecurity(chr))
|
||||
return false;
|
||||
|
|
@ -1007,7 +1007,7 @@ bool ChatHandler::HandleModifyASpeedCommand(char* args)
|
|||
|
||||
if (chr->IsTaxiFlying())
|
||||
{
|
||||
PSendSysMessage(LANG_CHAR_IN_FLIGHT,chrNameLink.c_str());
|
||||
PSendSysMessage(LANG_CHAR_IN_FLIGHT, chrNameLink.c_str());
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
|
@ -1055,7 +1055,7 @@ bool ChatHandler::HandleModifySpeedCommand(char* args)
|
|||
|
||||
if (chr->IsTaxiFlying())
|
||||
{
|
||||
PSendSysMessage(LANG_CHAR_IN_FLIGHT,chrNameLink.c_str());
|
||||
PSendSysMessage(LANG_CHAR_IN_FLIGHT, chrNameLink.c_str());
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
|
@ -1100,7 +1100,7 @@ bool ChatHandler::HandleModifySwimCommand(char* args)
|
|||
|
||||
if (chr->IsTaxiFlying())
|
||||
{
|
||||
PSendSysMessage(LANG_CHAR_IN_FLIGHT,chrNameLink.c_str());
|
||||
PSendSysMessage(LANG_CHAR_IN_FLIGHT, chrNameLink.c_str());
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
|
@ -1145,7 +1145,7 @@ bool ChatHandler::HandleModifyBWalkCommand(char* args)
|
|||
|
||||
if (chr->IsTaxiFlying())
|
||||
{
|
||||
PSendSysMessage(LANG_CHAR_IN_FLIGHT,chrNameLink.c_str());
|
||||
PSendSysMessage(LANG_CHAR_IN_FLIGHT, chrNameLink.c_str());
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
|
@ -1217,7 +1217,7 @@ bool ChatHandler::HandleModifyScaleCommand(char* args)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (target->GetTypeId()==TYPEID_PLAYER)
|
||||
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
// check online security
|
||||
if (HasLowerSecurity((Player*)target))
|
||||
|
|
@ -1246,211 +1246,211 @@ bool ChatHandler::HandleModifyMountCommand(char* args)
|
|||
switch (num)
|
||||
{
|
||||
case 1:
|
||||
mId=14340;
|
||||
mId = 14340;
|
||||
break;
|
||||
case 2:
|
||||
mId=4806;
|
||||
mId = 4806;
|
||||
break;
|
||||
case 3:
|
||||
mId=6471;
|
||||
mId = 6471;
|
||||
break;
|
||||
case 4:
|
||||
mId=12345;
|
||||
mId = 12345;
|
||||
break;
|
||||
case 5:
|
||||
mId=6472;
|
||||
mId = 6472;
|
||||
break;
|
||||
case 6:
|
||||
mId=6473;
|
||||
mId = 6473;
|
||||
break;
|
||||
case 7:
|
||||
mId=10670;
|
||||
mId = 10670;
|
||||
break;
|
||||
case 8:
|
||||
mId=10719;
|
||||
mId = 10719;
|
||||
break;
|
||||
case 9:
|
||||
mId=10671;
|
||||
mId = 10671;
|
||||
break;
|
||||
case 10:
|
||||
mId=10672;
|
||||
mId = 10672;
|
||||
break;
|
||||
case 11:
|
||||
mId=10720;
|
||||
mId = 10720;
|
||||
break;
|
||||
case 12:
|
||||
mId=14349;
|
||||
mId = 14349;
|
||||
break;
|
||||
case 13:
|
||||
mId=11641;
|
||||
mId = 11641;
|
||||
break;
|
||||
case 14:
|
||||
mId=12244;
|
||||
mId = 12244;
|
||||
break;
|
||||
case 15:
|
||||
mId=12242;
|
||||
mId = 12242;
|
||||
break;
|
||||
case 16:
|
||||
mId=14578;
|
||||
mId = 14578;
|
||||
break;
|
||||
case 17:
|
||||
mId=14579;
|
||||
mId = 14579;
|
||||
break;
|
||||
case 18:
|
||||
mId=14349;
|
||||
mId = 14349;
|
||||
break;
|
||||
case 19:
|
||||
mId=12245;
|
||||
mId = 12245;
|
||||
break;
|
||||
case 20:
|
||||
mId=14335;
|
||||
mId = 14335;
|
||||
break;
|
||||
case 21:
|
||||
mId=207;
|
||||
mId = 207;
|
||||
break;
|
||||
case 22:
|
||||
mId=2328;
|
||||
mId = 2328;
|
||||
break;
|
||||
case 23:
|
||||
mId=2327;
|
||||
mId = 2327;
|
||||
break;
|
||||
case 24:
|
||||
mId=2326;
|
||||
mId = 2326;
|
||||
break;
|
||||
case 25:
|
||||
mId=14573;
|
||||
mId = 14573;
|
||||
break;
|
||||
case 26:
|
||||
mId=14574;
|
||||
mId = 14574;
|
||||
break;
|
||||
case 27:
|
||||
mId=14575;
|
||||
mId = 14575;
|
||||
break;
|
||||
case 28:
|
||||
mId=604;
|
||||
mId = 604;
|
||||
break;
|
||||
case 29:
|
||||
mId=1166;
|
||||
mId = 1166;
|
||||
break;
|
||||
case 30:
|
||||
mId=2402;
|
||||
mId = 2402;
|
||||
break;
|
||||
case 31:
|
||||
mId=2410;
|
||||
mId = 2410;
|
||||
break;
|
||||
case 32:
|
||||
mId=2409;
|
||||
mId = 2409;
|
||||
break;
|
||||
case 33:
|
||||
mId=2408;
|
||||
mId = 2408;
|
||||
break;
|
||||
case 34:
|
||||
mId=2405;
|
||||
mId = 2405;
|
||||
break;
|
||||
case 35:
|
||||
mId=14337;
|
||||
mId = 14337;
|
||||
break;
|
||||
case 36:
|
||||
mId=6569;
|
||||
mId = 6569;
|
||||
break;
|
||||
case 37:
|
||||
mId=10661;
|
||||
mId = 10661;
|
||||
break;
|
||||
case 38:
|
||||
mId=10666;
|
||||
mId = 10666;
|
||||
break;
|
||||
case 39:
|
||||
mId=9473;
|
||||
mId = 9473;
|
||||
break;
|
||||
case 40:
|
||||
mId=9476;
|
||||
mId = 9476;
|
||||
break;
|
||||
case 41:
|
||||
mId=9474;
|
||||
mId = 9474;
|
||||
break;
|
||||
case 42:
|
||||
mId=14374;
|
||||
mId = 14374;
|
||||
break;
|
||||
case 43:
|
||||
mId=14376;
|
||||
mId = 14376;
|
||||
break;
|
||||
case 44:
|
||||
mId=14377;
|
||||
mId = 14377;
|
||||
break;
|
||||
case 45:
|
||||
mId=2404;
|
||||
mId = 2404;
|
||||
break;
|
||||
case 46:
|
||||
mId=2784;
|
||||
mId = 2784;
|
||||
break;
|
||||
case 47:
|
||||
mId=2787;
|
||||
mId = 2787;
|
||||
break;
|
||||
case 48:
|
||||
mId=2785;
|
||||
mId = 2785;
|
||||
break;
|
||||
case 49:
|
||||
mId=2736;
|
||||
mId = 2736;
|
||||
break;
|
||||
case 50:
|
||||
mId=2786;
|
||||
mId = 2786;
|
||||
break;
|
||||
case 51:
|
||||
mId=14347;
|
||||
mId = 14347;
|
||||
break;
|
||||
case 52:
|
||||
mId=14346;
|
||||
mId = 14346;
|
||||
break;
|
||||
case 53:
|
||||
mId=14576;
|
||||
mId = 14576;
|
||||
break;
|
||||
case 54:
|
||||
mId=9695;
|
||||
mId = 9695;
|
||||
break;
|
||||
case 55:
|
||||
mId=9991;
|
||||
mId = 9991;
|
||||
break;
|
||||
case 56:
|
||||
mId=6448;
|
||||
mId = 6448;
|
||||
break;
|
||||
case 57:
|
||||
mId=6444;
|
||||
mId = 6444;
|
||||
break;
|
||||
case 58:
|
||||
mId=6080;
|
||||
mId = 6080;
|
||||
break;
|
||||
case 59:
|
||||
mId=6447;
|
||||
mId = 6447;
|
||||
break;
|
||||
case 60:
|
||||
mId=4805;
|
||||
mId = 4805;
|
||||
break;
|
||||
case 61:
|
||||
mId=9714;
|
||||
mId = 9714;
|
||||
break;
|
||||
case 62:
|
||||
mId=6448;
|
||||
mId = 6448;
|
||||
break;
|
||||
case 63:
|
||||
mId=6442;
|
||||
mId = 6442;
|
||||
break;
|
||||
case 64:
|
||||
mId=14632;
|
||||
mId = 14632;
|
||||
break;
|
||||
case 65:
|
||||
mId=14332;
|
||||
mId = 14332;
|
||||
break;
|
||||
case 66:
|
||||
mId=14331;
|
||||
mId = 14331;
|
||||
break;
|
||||
case 67:
|
||||
mId=8469;
|
||||
mId = 8469;
|
||||
break;
|
||||
case 68:
|
||||
mId=2830;
|
||||
mId = 2830;
|
||||
break;
|
||||
case 69:
|
||||
mId=2346;
|
||||
mId = 2346;
|
||||
break;
|
||||
default:
|
||||
SendSysMessage(LANG_NO_MOUNT);
|
||||
|
|
@ -1477,14 +1477,14 @@ bool ChatHandler::HandleModifyMountCommand(char* args)
|
|||
chr->SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP);
|
||||
chr->Mount(mId);
|
||||
|
||||
WorldPacket data(SMSG_FORCE_RUN_SPEED_CHANGE, (8+4+1+4));
|
||||
WorldPacket data(SMSG_FORCE_RUN_SPEED_CHANGE, (8 + 4 + 1 + 4));
|
||||
data << chr->GetPackGUID();
|
||||
data << (uint32)0;
|
||||
data << (uint8)0; //new 2.1.0
|
||||
data << float(speed);
|
||||
chr->SendMessageToSet(&data, true);
|
||||
|
||||
data.Initialize(SMSG_FORCE_SWIM_SPEED_CHANGE, (8+4+4));
|
||||
data.Initialize(SMSG_FORCE_SWIM_SPEED_CHANGE, (8 + 4 + 4));
|
||||
data << chr->GetPackGUID();
|
||||
data << (uint32)0;
|
||||
data << float(speed);
|
||||
|
|
@ -1545,7 +1545,7 @@ bool ChatHandler::HandleModifyMoneyCommand(char* args)
|
|||
if (needReportToTarget(chr))
|
||||
ChatHandler(chr).PSendSysMessage(LANG_YOURS_MONEY_GIVEN, GetNameLink().c_str(), addmoney);
|
||||
|
||||
if (addmoney >=MAX_MONEY_AMOUNT)
|
||||
if (addmoney >= MAX_MONEY_AMOUNT)
|
||||
chr->SetMoney(MAX_MONEY_AMOUNT);
|
||||
else
|
||||
chr->ModifyMoney(addmoney);
|
||||
|
|
@ -1610,7 +1610,7 @@ bool ChatHandler::HandleLookupAreaCommand(char* args)
|
|||
std::string namepart = args;
|
||||
std::wstring wnamepart;
|
||||
|
||||
if (!Utf8toWStr(namepart,wnamepart))
|
||||
if (!Utf8toWStr(namepart, wnamepart))
|
||||
return false;
|
||||
|
||||
uint32 counter = 0; // Counter for figure out that we found smth.
|
||||
|
|
@ -1634,7 +1634,7 @@ bool ChatHandler::HandleLookupAreaCommand(char* args)
|
|||
loc = 0;
|
||||
for (; loc < MAX_LOCALE; ++loc)
|
||||
{
|
||||
if (loc==GetSessionDbcLocale())
|
||||
if (loc == GetSessionDbcLocale())
|
||||
continue;
|
||||
|
||||
name = areaEntry->area_name[loc];
|
||||
|
|
@ -1651,7 +1651,7 @@ bool ChatHandler::HandleLookupAreaCommand(char* args)
|
|||
// send area in "id - [name]" format
|
||||
std::ostringstream ss;
|
||||
if (m_session)
|
||||
ss << areaEntry->ID << " - |cffffffff|Harea:" << areaEntry->ID << "|h[" << name << " " << localeNames[loc]<< "]|h|r";
|
||||
ss << areaEntry->ID << " - |cffffffff|Harea:" << areaEntry->ID << "|h[" << name << " " << localeNames[loc] << "]|h|r";
|
||||
else
|
||||
ss << areaEntry->ID << " - " << name << " " << localeNames[loc];
|
||||
|
||||
|
|
@ -1681,7 +1681,7 @@ bool ChatHandler::HandleLookupTeleCommand(char* args)
|
|||
std::string namepart = args;
|
||||
std::wstring wnamepart;
|
||||
|
||||
if (!Utf8toWStr(namepart,wnamepart))
|
||||
if (!Utf8toWStr(namepart, wnamepart))
|
||||
return false;
|
||||
|
||||
// converting string that we try to find to lower case
|
||||
|
|
@ -1706,7 +1706,7 @@ bool ChatHandler::HandleLookupTeleCommand(char* args)
|
|||
if (reply.str().empty())
|
||||
SendSysMessage(LANG_COMMAND_TELE_NOLOCATION);
|
||||
else
|
||||
PSendSysMessage(LANG_COMMAND_TELE_LOCATION,reply.str().c_str());
|
||||
PSendSysMessage(LANG_COMMAND_TELE_LOCATION, reply.str().c_str());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -1771,7 +1771,7 @@ bool ChatHandler::HandleSendMailCommand(char* args)
|
|||
// from console show nonexistent sender
|
||||
MailSender sender(MAIL_NORMAL, m_session ? m_session->GetPlayer()->GetObjectGuid().GetCounter() : 0, MAIL_STATIONERY_GM);
|
||||
|
||||
draft.SendMailTo(MailReceiver(target, target_guid),sender);
|
||||
draft.SendMailTo(MailReceiver(target, target_guid), sender);
|
||||
|
||||
std::string nameLink = playerLink(target_name);
|
||||
PSendSysMessage(LANG_MAIL_SENT, nameLink.c_str());
|
||||
|
|
@ -1806,14 +1806,14 @@ bool ChatHandler::HandleTeleNameCommand(char* args)
|
|||
|
||||
std::string chrNameLink = playerLink(target_name);
|
||||
|
||||
if (target->IsBeingTeleported()==true)
|
||||
if (target->IsBeingTeleported() == true)
|
||||
{
|
||||
PSendSysMessage(LANG_IS_TELEPORTED, chrNameLink.c_str());
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
PSendSysMessage(LANG_TELEPORTING_TO, chrNameLink.c_str(),"", tele->name.c_str());
|
||||
PSendSysMessage(LANG_TELEPORTING_TO, chrNameLink.c_str(), "", tele->name.c_str());
|
||||
if (needReportToTarget(target))
|
||||
ChatHandler(target).PSendSysMessage(LANG_TELEPORTED_TO_BY, GetNameLink().c_str());
|
||||
|
||||
|
|
@ -1830,7 +1830,7 @@ bool ChatHandler::HandleTeleNameCommand(char* args)
|
|||
PSendSysMessage(LANG_TELEPORTING_TO, nameLink.c_str(), GetMangosString(LANG_OFFLINE), tele->name.c_str());
|
||||
Player::SavePositionInDB(target_guid, tele->mapId,
|
||||
tele->position_x, tele->position_y, tele->position_z, tele->orientation,
|
||||
sTerrainMgr.GetZoneId(tele->mapId,tele->position_x,tele->position_y,tele->position_z));
|
||||
sTerrainMgr.GetZoneId(tele->mapId, tele->position_x, tele->position_y, tele->position_z));
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
@ -1868,7 +1868,7 @@ bool ChatHandler::HandleTeleGroupCommand(char* args)
|
|||
Group* grp = player->GetGroup();
|
||||
if (!grp)
|
||||
{
|
||||
PSendSysMessage(LANG_NOT_IN_GROUP,nameLink.c_str());
|
||||
PSendSysMessage(LANG_NOT_IN_GROUP, nameLink.c_str());
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
|
@ -1892,7 +1892,7 @@ bool ChatHandler::HandleTeleGroupCommand(char* args)
|
|||
continue;
|
||||
}
|
||||
|
||||
PSendSysMessage(LANG_TELEPORTING_TO, plNameLink.c_str(),"", tele->name.c_str());
|
||||
PSendSysMessage(LANG_TELEPORTING_TO, plNameLink.c_str(), "", tele->name.c_str());
|
||||
if (needReportToTarget(pl))
|
||||
ChatHandler(pl).PSendSysMessage(LANG_TELEPORTED_TO_BY, nameLink.c_str());
|
||||
|
||||
|
|
@ -1929,7 +1929,7 @@ bool ChatHandler::HandleGroupgoCommand(char* args)
|
|||
|
||||
if (!grp)
|
||||
{
|
||||
PSendSysMessage(LANG_NOT_IN_GROUP,nameLink.c_str());
|
||||
PSendSysMessage(LANG_NOT_IN_GROUP, nameLink.c_str());
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
|
@ -1952,7 +1952,7 @@ bool ChatHandler::HandleGroupgoCommand(char* args)
|
|||
{
|
||||
Player* pl = itr->getSource();
|
||||
|
||||
if (!pl || pl==m_session->GetPlayer() || !pl->GetSession())
|
||||
if (!pl || pl == m_session->GetPlayer() || !pl->GetSession())
|
||||
continue;
|
||||
|
||||
// check online security
|
||||
|
|
@ -1961,7 +1961,7 @@ bool ChatHandler::HandleGroupgoCommand(char* args)
|
|||
|
||||
std::string plNameLink = GetNameLink(pl);
|
||||
|
||||
if (pl->IsBeingTeleported()==true)
|
||||
if (pl->IsBeingTeleported() == true)
|
||||
{
|
||||
PSendSysMessage(LANG_IS_TELEPORTED, plNameLink.c_str());
|
||||
SetSentErrorMessage(true);
|
||||
|
|
@ -1975,13 +1975,13 @@ bool ChatHandler::HandleGroupgoCommand(char* args)
|
|||
if (plMap->Instanceable() && plMap->GetInstanceId() != gmMap->GetInstanceId())
|
||||
{
|
||||
// cannot summon from instance to instance
|
||||
PSendSysMessage(LANG_CANNOT_SUMMON_TO_INST,plNameLink.c_str());
|
||||
PSendSysMessage(LANG_CANNOT_SUMMON_TO_INST, plNameLink.c_str());
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
PSendSysMessage(LANG_SUMMONING, plNameLink.c_str(),"");
|
||||
PSendSysMessage(LANG_SUMMONING, plNameLink.c_str(), "");
|
||||
if (needReportToTarget(pl))
|
||||
ChatHandler(pl).PSendSysMessage(LANG_SUMMONED_BY, nameLink.c_str());
|
||||
|
||||
|
|
@ -1996,9 +1996,9 @@ bool ChatHandler::HandleGroupgoCommand(char* args)
|
|||
pl->SaveRecallPosition();
|
||||
|
||||
// before GM
|
||||
float x,y,z;
|
||||
float x, y, z;
|
||||
m_session->GetPlayer()->GetClosePoint(x, y, z, pl->GetObjectBoundingRadius());
|
||||
pl->TeleportTo(m_session->GetPlayer()->GetMapId(),x,y,z,pl->GetOrientation());
|
||||
pl->TeleportTo(m_session->GetPlayer()->GetMapId(), x, y, z, pl->GetOrientation());
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
@ -2017,9 +2017,9 @@ bool ChatHandler::HandleGoHelper(Player* player, uint32 mapid, float x, float y,
|
|||
ort = *ortPtr;
|
||||
|
||||
// check full provided coordinates
|
||||
if (!MapManager::IsValidMapCoord(mapid,x,y,z,ort))
|
||||
if (!MapManager::IsValidMapCoord(mapid, x, y, z, ort))
|
||||
{
|
||||
PSendSysMessage(LANG_INVALID_TARGET_COORD,x,y,mapid);
|
||||
PSendSysMessage(LANG_INVALID_TARGET_COORD, x, y, mapid);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
|
@ -2027,9 +2027,9 @@ bool ChatHandler::HandleGoHelper(Player* player, uint32 mapid, float x, float y,
|
|||
else
|
||||
{
|
||||
// we need check x,y before ask Z or can crash at invalide coordinates
|
||||
if (!MapManager::IsValidMapCoord(mapid,x,y))
|
||||
if (!MapManager::IsValidMapCoord(mapid, x, y))
|
||||
{
|
||||
PSendSysMessage(LANG_INVALID_TARGET_COORD,x,y,mapid);
|
||||
PSendSysMessage(LANG_INVALID_TARGET_COORD, x, y, mapid);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
|
@ -2071,7 +2071,7 @@ bool ChatHandler::HandleGoTaxinodeCommand(char* args)
|
|||
|
||||
if (node->x == 0.0f && node->y == 0.0f && node->z == 0.0f)
|
||||
{
|
||||
PSendSysMessage(LANG_INVALID_TARGET_COORD,node->x,node->y,node->map_id);
|
||||
PSendSysMessage(LANG_INVALID_TARGET_COORD, node->x, node->y, node->map_id);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
|
@ -2198,7 +2198,7 @@ bool ChatHandler::HandleGoZoneXYCommand(char* args)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!Zone2MapCoordinates(x,y,zoneEntry->ID))
|
||||
if (!Zone2MapCoordinates(x, y, zoneEntry->ID))
|
||||
{
|
||||
PSendSysMessage(LANG_INVALID_ZONE_MAP, areaEntry->ID, areaEntry->area_name[GetSessionDbcLocale()],
|
||||
mapEntry->MapID, mapEntry->name[GetSessionDbcLocale()]);
|
||||
|
|
@ -2227,8 +2227,8 @@ bool ChatHandler::HandleGoGridCommand(char* args)
|
|||
return false;
|
||||
|
||||
// center of grid
|
||||
float x = (grid_x-CENTER_GRID_ID+0.5f)*SIZE_OF_GRIDS;
|
||||
float y = (grid_y-CENTER_GRID_ID+0.5f)*SIZE_OF_GRIDS;
|
||||
float x = (grid_x - CENTER_GRID_ID + 0.5f) * SIZE_OF_GRIDS;
|
||||
float y = (grid_y - CENTER_GRID_ID + 0.5f) * SIZE_OF_GRIDS;
|
||||
|
||||
return HandleGoHelper(_player, mapid, x, y);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue