mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04: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
|
|
@ -86,7 +86,7 @@ bool ChatHandler::HandleMuteCommand(char* args)
|
|||
if (HasLowerSecurity(target, target_guid, true))
|
||||
return false;
|
||||
|
||||
time_t mutetime = time(NULL) + notspeaktime*60;
|
||||
time_t mutetime = time(NULL) + notspeaktime * 60;
|
||||
|
||||
if (target)
|
||||
target->GetSession()->m_muteTime = mutetime;
|
||||
|
|
@ -222,7 +222,7 @@ bool ChatHandler::HandleTriggerCommand(char* args)
|
|||
if (!m_session)
|
||||
return false;
|
||||
|
||||
float dist2 = MAP_SIZE*MAP_SIZE;
|
||||
float dist2 = MAP_SIZE * MAP_SIZE;
|
||||
|
||||
Player* pl = m_session->GetPlayer();
|
||||
|
||||
|
|
@ -239,7 +239,7 @@ bool ChatHandler::HandleTriggerCommand(char* args)
|
|||
float dx = atTestEntry->x - pl->GetPositionX();
|
||||
float dy = atTestEntry->y - pl->GetPositionY();
|
||||
|
||||
float test_dist2 = dx*dx + dy*dy;
|
||||
float test_dist2 = dx * dx + dy * dy;
|
||||
|
||||
if (test_dist2 >= dist2)
|
||||
continue;
|
||||
|
|
@ -338,7 +338,7 @@ bool ChatHandler::HandleTriggerActiveCommand(char* /*args*/)
|
|||
bool ChatHandler::HandleTriggerNearCommand(char* args)
|
||||
{
|
||||
float distance = (!*args) ? 10.0f : (float)atof(args);
|
||||
float dist2 = distance*distance;
|
||||
float dist2 = distance * distance;
|
||||
uint32 counter = 0; // Counter for figure out that we found smth.
|
||||
|
||||
Player* pl = m_session->GetPlayer();
|
||||
|
|
@ -356,7 +356,7 @@ bool ChatHandler::HandleTriggerNearCommand(char* args)
|
|||
float dx = atEntry->x - pl->GetPositionX();
|
||||
float dy = atEntry->y - pl->GetPositionY();
|
||||
|
||||
if (dx*dx + dy*dy > dist2)
|
||||
if (dx * dx + dy * dy > dist2)
|
||||
continue;
|
||||
|
||||
ShowTriggerListHelper(atEntry);
|
||||
|
|
@ -381,7 +381,7 @@ bool ChatHandler::HandleTriggerNearCommand(char* args)
|
|||
float dx = at->target_X - pl->GetPositionX();
|
||||
float dy = at->target_Y - pl->GetPositionY();
|
||||
|
||||
if (dx*dx + dy*dy > dist2)
|
||||
if (dx * dx + dy * dy > dist2)
|
||||
continue;
|
||||
|
||||
ShowTriggerTargetListHelper(atEntry->id, at);
|
||||
|
|
@ -469,7 +469,7 @@ bool ChatHandler::HandleGoGraveyardCommand(char* args)
|
|||
|
||||
enum CreatureLinkType
|
||||
{
|
||||
CREATURE_LINK_RAW =-1, // non-link case
|
||||
CREATURE_LINK_RAW = -1, // non-link case
|
||||
CREATURE_LINK_GUID = 0,
|
||||
CREATURE_LINK_ENTRY = 1,
|
||||
};
|
||||
|
|
@ -584,7 +584,7 @@ bool ChatHandler::HandleGoCreatureCommand(char* args)
|
|||
{
|
||||
std::string name = pParam1;
|
||||
WorldDatabase.escape_string(name);
|
||||
QueryResult* result = WorldDatabase.PQuery("SELECT guid FROM creature, creature_template WHERE creature.id = creature_template.entry AND creature_template.name "_LIKE_" "_CONCAT3_("'%%'","'%s'","'%%'"), name.c_str());
|
||||
QueryResult* result = WorldDatabase.PQuery("SELECT guid FROM creature, creature_template WHERE creature.id = creature_template.entry AND creature_template.name "_LIKE_" "_CONCAT3_("'%%'", "'%s'", "'%%'"), name.c_str());
|
||||
if (!result)
|
||||
{
|
||||
SendSysMessage(LANG_COMMAND_GOCREATNOTFOUND);
|
||||
|
|
@ -629,7 +629,7 @@ bool ChatHandler::HandleGoCreatureCommand(char* args)
|
|||
|
||||
enum GameobjectLinkType
|
||||
{
|
||||
GAMEOBJECT_LINK_RAW =-1, // non-link case
|
||||
GAMEOBJECT_LINK_RAW = -1, // non-link case
|
||||
GAMEOBJECT_LINK_GUID = 0,
|
||||
GAMEOBJECT_LINK_ENTRY = 1,
|
||||
};
|
||||
|
|
@ -733,7 +733,7 @@ bool ChatHandler::HandleGoObjectCommand(char* args)
|
|||
{
|
||||
std::string name = pParam1;
|
||||
WorldDatabase.escape_string(name);
|
||||
QueryResult* result = WorldDatabase.PQuery("SELECT guid FROM gameobject, gameobject_template WHERE gameobject.id = gameobject_template.entry AND gameobject_template.name "_LIKE_" "_CONCAT3_("'%%'","'%s'","'%%'"), name.c_str());
|
||||
QueryResult* result = WorldDatabase.PQuery("SELECT guid FROM gameobject, gameobject_template WHERE gameobject.id = gameobject_template.entry AND gameobject_template.name "_LIKE_" "_CONCAT3_("'%%'", "'%s'", "'%%'"), name.c_str());
|
||||
if (!result)
|
||||
{
|
||||
SendSysMessage(LANG_COMMAND_GOOBJNOTFOUND);
|
||||
|
|
@ -792,7 +792,7 @@ bool ChatHandler::HandleGameObjectTargetCommand(char* args)
|
|||
if (ExtractUInt32(&cId, id))
|
||||
{
|
||||
result = WorldDatabase.PQuery("SELECT guid, id, position_x, position_y, position_z, orientation, map, (POW(position_x - '%f', 2) + POW(position_y - '%f', 2) + POW(position_z - '%f', 2)) AS order_ FROM gameobject WHERE map = '%i' AND id = '%u' ORDER BY order_ ASC LIMIT 1",
|
||||
pl->GetPositionX(), pl->GetPositionY(), pl->GetPositionZ(), pl->GetMapId(),id);
|
||||
pl->GetPositionX(), pl->GetPositionY(), pl->GetPositionZ(), pl->GetMapId(), id);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -800,8 +800,8 @@ bool ChatHandler::HandleGameObjectTargetCommand(char* args)
|
|||
WorldDatabase.escape_string(name);
|
||||
result = WorldDatabase.PQuery(
|
||||
"SELECT guid, id, position_x, position_y, position_z, orientation, map, (POW(position_x - %f, 2) + POW(position_y - %f, 2) + POW(position_z - %f, 2)) AS order_ "
|
||||
"FROM gameobject,gameobject_template WHERE gameobject_template.entry = gameobject.id AND map = %i AND name "_LIKE_" "_CONCAT3_("'%%'","'%s'","'%%'")" ORDER BY order_ ASC LIMIT 1",
|
||||
pl->GetPositionX(), pl->GetPositionY(), pl->GetPositionZ(), pl->GetMapId(),name.c_str());
|
||||
"FROM gameobject,gameobject_template WHERE gameobject_template.entry = gameobject.id AND map = %i AND name "_LIKE_" "_CONCAT3_("'%%'", "'%s'", "'%%'")" ORDER BY order_ ASC LIMIT 1",
|
||||
pl->GetPositionX(), pl->GetPositionY(), pl->GetPositionZ(), pl->GetMapId(), name.c_str());
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -814,8 +814,8 @@ bool ChatHandler::HandleGameObjectTargetCommand(char* args)
|
|||
{
|
||||
if (initString)
|
||||
{
|
||||
eventFilter << "OR event IN (" <<*itr;
|
||||
initString =false;
|
||||
eventFilter << "OR event IN (" << *itr;
|
||||
initString = false;
|
||||
}
|
||||
else
|
||||
eventFilter << "," << *itr;
|
||||
|
|
@ -829,7 +829,7 @@ bool ChatHandler::HandleGameObjectTargetCommand(char* args)
|
|||
result = WorldDatabase.PQuery("SELECT gameobject.guid, id, position_x, position_y, position_z, orientation, map, "
|
||||
"(POW(position_x - %f, 2) + POW(position_y - %f, 2) + POW(position_z - %f, 2)) AS order_ FROM gameobject "
|
||||
"LEFT OUTER JOIN game_event_gameobject on gameobject.guid=game_event_gameobject.guid WHERE map = '%i' %s ORDER BY order_ ASC LIMIT 10",
|
||||
m_session->GetPlayer()->GetPositionX(), m_session->GetPlayer()->GetPositionY(), m_session->GetPlayer()->GetPositionZ(), m_session->GetPlayer()->GetMapId(),eventFilter.str().c_str());
|
||||
m_session->GetPlayer()->GetPositionX(), m_session->GetPlayer()->GetPositionY(), m_session->GetPlayer()->GetPositionZ(), m_session->GetPlayer()->GetMapId(), eventFilter.str().c_str());
|
||||
}
|
||||
|
||||
if (!result)
|
||||
|
|
@ -863,7 +863,7 @@ bool ChatHandler::HandleGameObjectTargetCommand(char* args)
|
|||
|
||||
if (!found)
|
||||
{
|
||||
PSendSysMessage(LANG_GAMEOBJECT_NOT_EXIST,id);
|
||||
PSendSysMessage(LANG_GAMEOBJECT_NOT_EXIST, id);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -871,7 +871,7 @@ bool ChatHandler::HandleGameObjectTargetCommand(char* args)
|
|||
|
||||
if (!goI)
|
||||
{
|
||||
PSendSysMessage(LANG_GAMEOBJECT_NOT_EXIST,id);
|
||||
PSendSysMessage(LANG_GAMEOBJECT_NOT_EXIST, id);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -881,14 +881,14 @@ bool ChatHandler::HandleGameObjectTargetCommand(char* args)
|
|||
|
||||
if (target)
|
||||
{
|
||||
time_t curRespawnDelay = target->GetRespawnTimeEx()-time(NULL);
|
||||
time_t curRespawnDelay = target->GetRespawnTimeEx() - time(NULL);
|
||||
if (curRespawnDelay < 0)
|
||||
curRespawnDelay = 0;
|
||||
|
||||
std::string curRespawnDelayStr = secsToTimeString(curRespawnDelay,true);
|
||||
std::string defRespawnDelayStr = secsToTimeString(target->GetRespawnDelay(),true);
|
||||
std::string curRespawnDelayStr = secsToTimeString(curRespawnDelay, true);
|
||||
std::string defRespawnDelayStr = secsToTimeString(target->GetRespawnDelay(), true);
|
||||
|
||||
PSendSysMessage(LANG_COMMAND_RAWPAWNTIMES, defRespawnDelayStr.c_str(),curRespawnDelayStr.c_str());
|
||||
PSendSysMessage(LANG_COMMAND_RAWPAWNTIMES, defRespawnDelayStr.c_str(), curRespawnDelayStr.c_str());
|
||||
|
||||
ShowNpcOrGoSpawnInformation<GameObject>(target->GetGUIDLow());
|
||||
}
|
||||
|
|
@ -910,7 +910,7 @@ bool ChatHandler::HandleGameObjectDeleteCommand(char* args)
|
|||
|
||||
// by DB guid
|
||||
if (GameObjectData const* go_data = sObjectMgr.GetGOData(lowguid))
|
||||
obj = GetGameObjectWithGuid(lowguid,go_data->id);
|
||||
obj = GetGameObjectWithGuid(lowguid, go_data->id);
|
||||
|
||||
if (!obj)
|
||||
{
|
||||
|
|
@ -929,7 +929,7 @@ bool ChatHandler::HandleGameObjectDeleteCommand(char* args)
|
|||
return false;
|
||||
}
|
||||
|
||||
owner->RemoveGameObject(obj,false);
|
||||
owner->RemoveGameObject(obj, false);
|
||||
}
|
||||
|
||||
obj->SetRespawnTime(0); // not save respawn time
|
||||
|
|
@ -956,7 +956,7 @@ bool ChatHandler::HandleGameObjectTurnCommand(char* args)
|
|||
|
||||
// by DB guid
|
||||
if (GameObjectData const* go_data = sObjectMgr.GetGOData(lowguid))
|
||||
obj = GetGameObjectWithGuid(lowguid,go_data->id);
|
||||
obj = GetGameObjectWithGuid(lowguid, go_data->id);
|
||||
|
||||
if (!obj)
|
||||
{
|
||||
|
|
@ -990,7 +990,7 @@ bool ChatHandler::HandleGameObjectMoveCommand(char* args)
|
|||
|
||||
// by DB guid
|
||||
if (GameObjectData const* go_data = sObjectMgr.GetGOData(lowguid))
|
||||
obj = GetGameObjectWithGuid(lowguid,go_data->id);
|
||||
obj = GetGameObjectWithGuid(lowguid, go_data->id);
|
||||
|
||||
if (!obj)
|
||||
{
|
||||
|
|
@ -1004,7 +1004,7 @@ bool ChatHandler::HandleGameObjectMoveCommand(char* args)
|
|||
Player* chr = m_session->GetPlayer();
|
||||
|
||||
Map* map = obj->GetMap();
|
||||
map->Remove(obj,false);
|
||||
map->Remove(obj, false);
|
||||
|
||||
obj->Relocate(chr->GetPositionX(), chr->GetPositionY(), chr->GetPositionZ(), obj->GetOrientation());
|
||||
|
||||
|
|
@ -1032,7 +1032,7 @@ bool ChatHandler::HandleGameObjectMoveCommand(char* args)
|
|||
}
|
||||
|
||||
Map* map = obj->GetMap();
|
||||
map->Remove(obj,false);
|
||||
map->Remove(obj, false);
|
||||
|
||||
obj->Relocate(x, y, z, obj->GetOrientation());
|
||||
|
||||
|
|
@ -1121,7 +1121,7 @@ bool ChatHandler::HandleGameObjectAddCommand(char* args)
|
|||
|
||||
sObjectMgr.AddGameobjectToGrid(db_lowGUID, sObjectMgr.GetGOData(db_lowGUID));
|
||||
|
||||
PSendSysMessage(LANG_GAMEOBJECT_ADD,id,gInfo->name,db_lowGUID,x,y,z);
|
||||
PSendSysMessage(LANG_GAMEOBJECT_ADD, id, gInfo->name, db_lowGUID, x, y, z);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -1140,7 +1140,7 @@ bool ChatHandler::HandleGameObjectPhaseCommand(char* args)
|
|||
|
||||
// by DB guid
|
||||
if (GameObjectData const* go_data = sObjectMgr.GetGOData(lowguid))
|
||||
obj = GetGameObjectWithGuid(lowguid,go_data->id);
|
||||
obj = GetGameObjectWithGuid(lowguid, go_data->id);
|
||||
|
||||
if (!obj)
|
||||
{
|
||||
|
|
@ -1157,7 +1157,7 @@ bool ChatHandler::HandleGameObjectPhaseCommand(char* args)
|
|||
return false;
|
||||
}
|
||||
|
||||
obj->SetPhaseMask(phasemask,true);
|
||||
obj->SetPhaseMask(phasemask, true);
|
||||
obj->SaveToDB();
|
||||
return true;
|
||||
}
|
||||
|
|
@ -1175,7 +1175,7 @@ bool ChatHandler::HandleGameObjectNearCommand(char* args)
|
|||
"(POW(position_x - '%f', 2) + POW(position_y - '%f', 2) + POW(position_z - '%f', 2)) AS order_ "
|
||||
"FROM gameobject WHERE map='%u' AND (POW(position_x - '%f', 2) + POW(position_y - '%f', 2) + POW(position_z - '%f', 2)) <= '%f' ORDER BY order_",
|
||||
pl->GetPositionX(), pl->GetPositionY(), pl->GetPositionZ(),
|
||||
pl->GetMapId(), pl->GetPositionX(), pl->GetPositionY(), pl->GetPositionZ(),distance*distance);
|
||||
pl->GetMapId(), pl->GetPositionX(), pl->GetPositionY(), pl->GetPositionZ(), distance * distance);
|
||||
|
||||
if (result)
|
||||
{
|
||||
|
|
@ -1203,7 +1203,7 @@ bool ChatHandler::HandleGameObjectNearCommand(char* args)
|
|||
delete result;
|
||||
}
|
||||
|
||||
PSendSysMessage(LANG_COMMAND_NEAROBJMESSAGE,distance,count);
|
||||
PSendSysMessage(LANG_COMMAND_NEAROBJMESSAGE, distance, count);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -1237,7 +1237,7 @@ void ChatHandler::ShowAchievementListHelper(AchievementEntry const* achEntry, Lo
|
|||
{
|
||||
// complete date
|
||||
tm* aTm = localtime(date);
|
||||
ss << ":1:" << aTm->tm_mon+1 << ":" << aTm->tm_mday << ":" << (aTm->tm_year+1900-2000) << ":";
|
||||
ss << ":1:" << aTm->tm_mon + 1 << ":" << aTm->tm_mday << ":" << (aTm->tm_year + 1900 - 2000) << ":";
|
||||
|
||||
// complete criteria mask (all bits set)
|
||||
ss << uint32(-1) << ":" << uint32(-1) << ":" << uint32(-1) << ":" << uint32(-1) << ":";
|
||||
|
|
@ -1507,9 +1507,9 @@ bool ChatHandler::HandleModifyRepCommand(char* args)
|
|||
if (wrank.substr(0, wrankStr.size()) == wrankStr)
|
||||
{
|
||||
int32 delta;
|
||||
if (!ExtractOptInt32(&args, delta, 0) || (delta < 0) || (delta > ReputationMgr::PointsInRank[r] -1))
|
||||
if (!ExtractOptInt32(&args, delta, 0) || (delta < 0) || (delta > ReputationMgr::PointsInRank[r] - 1))
|
||||
{
|
||||
PSendSysMessage(LANG_COMMAND_FACTION_DELTA, (ReputationMgr::PointsInRank[r]-1));
|
||||
PSendSysMessage(LANG_COMMAND_FACTION_DELTA, (ReputationMgr::PointsInRank[r] - 1));
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
|
@ -1542,7 +1542,7 @@ bool ChatHandler::HandleModifyRepCommand(char* args)
|
|||
return false;
|
||||
}
|
||||
|
||||
target->GetReputationMgr().SetReputation(factionEntry,amount);
|
||||
target->GetReputationMgr().SetReputation(factionEntry, amount);
|
||||
PSendSysMessage(LANG_COMMAND_MODIFY_REP, factionEntry->name[GetSessionDbcLocale()], factionId,
|
||||
GetNameLink(target).c_str(), target->GetReputationMgr().GetReputation(factionEntry));
|
||||
return true;
|
||||
|
|
@ -1633,11 +1633,11 @@ bool ChatHandler::HandleNpcAddVendorItemCommand(char* args)
|
|||
return false;
|
||||
}
|
||||
|
||||
sObjectMgr.AddVendorItem(vendor_entry,itemId,maxcount,incrtime,extendedcost);
|
||||
sObjectMgr.AddVendorItem(vendor_entry, itemId, maxcount, incrtime, extendedcost);
|
||||
|
||||
ItemPrototype const* pProto = ObjectMgr::GetItemPrototype(itemId);
|
||||
|
||||
PSendSysMessage(LANG_ITEM_ADDED_TO_LIST,itemId,pProto->Name1,maxcount,incrtime,extendedcost);
|
||||
PSendSysMessage(LANG_ITEM_ADDED_TO_LIST, itemId, pProto->Name1, maxcount, incrtime, extendedcost);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -1665,14 +1665,14 @@ bool ChatHandler::HandleNpcDelVendorItemCommand(char* args)
|
|||
|
||||
if (!sObjectMgr.RemoveVendorItem(vendor->GetEntry(), itemId))
|
||||
{
|
||||
PSendSysMessage(LANG_ITEM_NOT_IN_LIST,itemId);
|
||||
PSendSysMessage(LANG_ITEM_NOT_IN_LIST, itemId);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
ItemPrototype const* pProto = ObjectMgr::GetItemPrototype(itemId);
|
||||
|
||||
PSendSysMessage(LANG_ITEM_DELETED_FROM_LIST,itemId,pProto->Name1);
|
||||
PSendSysMessage(LANG_ITEM_DELETED_FROM_LIST, itemId, pProto->Name1);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -1738,7 +1738,7 @@ bool ChatHandler::HandleNpcAddMoveCommand(char* args)
|
|||
sWaypointMgr.AddLastNode(lowguid, player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetOrientation(), wait, 0);
|
||||
|
||||
// update movement type
|
||||
WorldDatabase.PExecuteLog("UPDATE creature SET MovementType=%u WHERE guid=%u", WAYPOINT_MOTION_TYPE,lowguid);
|
||||
WorldDatabase.PExecuteLog("UPDATE creature SET MovementType=%u WHERE guid=%u", WAYPOINT_MOTION_TYPE, lowguid);
|
||||
if (pCreature)
|
||||
{
|
||||
pCreature->SetDefaultMovementType(WAYPOINT_MOTION_TYPE);
|
||||
|
|
@ -1782,8 +1782,8 @@ bool ChatHandler::HandleNpcChangeLevelCommand(char* args)
|
|||
((Pet*)pCreature)->GivePetLevel(lvl);
|
||||
else
|
||||
{
|
||||
pCreature->SetMaxHealth(100 + 30*lvl);
|
||||
pCreature->SetHealth(100 + 30*lvl);
|
||||
pCreature->SetMaxHealth(100 + 30 * lvl);
|
||||
pCreature->SetHealth(100 + 30 * lvl);
|
||||
pCreature->SetLevel(lvl);
|
||||
|
||||
if (pCreature->HasStaticDBSpawnData())
|
||||
|
|
@ -1927,7 +1927,7 @@ bool ChatHandler::HandleNpcMoveCommand(char* args)
|
|||
const_cast<CreatureData*>(data)->posZ = z;
|
||||
const_cast<CreatureData*>(data)->orientation = o;
|
||||
}
|
||||
pCreature->GetMap()->CreatureRelocation(pCreature,x, y, z,o);
|
||||
pCreature->GetMap()->CreatureRelocation(pCreature, x, y, z, o);
|
||||
pCreature->GetMotionMaster()->Initialize();
|
||||
if (pCreature->isAlive()) // dead creature will reset movement generator at respawn
|
||||
{
|
||||
|
|
@ -2032,9 +2032,9 @@ bool ChatHandler::HandleNpcSetMoveTypeCommand(char* args)
|
|||
}
|
||||
|
||||
if (doNotDelete)
|
||||
PSendSysMessage(LANG_MOVE_TYPE_SET_NODEL,type_str);
|
||||
PSendSysMessage(LANG_MOVE_TYPE_SET_NODEL, type_str);
|
||||
else
|
||||
PSendSysMessage(LANG_MOVE_TYPE_SET,type_str);
|
||||
PSendSysMessage(LANG_MOVE_TYPE_SET, type_str);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -2118,7 +2118,7 @@ bool ChatHandler::HandleNpcSpawnDistCommand(char* args)
|
|||
}
|
||||
|
||||
MovementGeneratorType mtype = IDLE_MOTION_TYPE;
|
||||
if (option >0.0f)
|
||||
if (option > 0.0f)
|
||||
mtype = RANDOM_MOTION_TYPE;
|
||||
|
||||
Creature* pCreature = getSelectedCreature();
|
||||
|
|
@ -2138,8 +2138,8 @@ bool ChatHandler::HandleNpcSpawnDistCommand(char* args)
|
|||
pCreature->Respawn();
|
||||
}
|
||||
|
||||
WorldDatabase.PExecuteLog("UPDATE creature SET spawndist=%f, MovementType=%i WHERE guid=%u",option,mtype,u_guidlow);
|
||||
PSendSysMessage(LANG_COMMAND_SPAWNDIST,option);
|
||||
WorldDatabase.PExecuteLog("UPDATE creature SET spawndist=%f, MovementType=%i WHERE guid=%u", option, mtype, u_guidlow);
|
||||
PSendSysMessage(LANG_COMMAND_SPAWNDIST, option);
|
||||
return true;
|
||||
}
|
||||
//spawn time handling
|
||||
|
|
@ -2198,7 +2198,7 @@ bool ChatHandler::HandleNpcUnFollowCommand(char* /*args*/)
|
|||
}
|
||||
|
||||
if (creature->GetMotionMaster()->empty() ||
|
||||
creature->GetMotionMaster()->GetCurrentMovementGeneratorType()!=FOLLOW_MOTION_TYPE)
|
||||
creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != FOLLOW_MOTION_TYPE)
|
||||
{
|
||||
PSendSysMessage(LANG_CREATURE_NOT_FOLLOW_YOU);
|
||||
SetSentErrorMessage(true);
|
||||
|
|
@ -2268,7 +2268,7 @@ bool ChatHandler::HandleNpcSetPhaseCommand(char* args)
|
|||
return false;
|
||||
}
|
||||
|
||||
pCreature->SetPhaseMask(phasemask,true);
|
||||
pCreature->SetPhaseMask(phasemask, true);
|
||||
|
||||
if (pCreature->HasStaticDBSpawnData())
|
||||
pCreature->SaveToDB();
|
||||
|
|
@ -2521,7 +2521,7 @@ bool ChatHandler::HandleModifyPhaseCommand(char* args)
|
|||
else if (target->GetTypeId() == TYPEID_PLAYER && HasLowerSecurity((Player*)target))
|
||||
return false;
|
||||
|
||||
target->SetPhaseMask(phasemask,true);
|
||||
target->SetPhaseMask(phasemask, true);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -2579,7 +2579,7 @@ bool ChatHandler::HandlePInfoCommand(char* args)
|
|||
AccountTypes security = SEC_PLAYER;
|
||||
std::string last_login = GetMangosString(LANG_ERROR);
|
||||
|
||||
QueryResult* result = LoginDatabase.PQuery("SELECT username,gmlevel,last_ip,last_login FROM account WHERE id = '%u'",accId);
|
||||
QueryResult* result = LoginDatabase.PQuery("SELECT username,gmlevel,last_ip,last_login FROM account WHERE id = '%u'", accId);
|
||||
if (result)
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
|
|
@ -2602,13 +2602,13 @@ bool ChatHandler::HandlePInfoCommand(char* args)
|
|||
|
||||
std::string nameLink = playerLink(target_name);
|
||||
|
||||
PSendSysMessage(LANG_PINFO_ACCOUNT, (target?"":GetMangosString(LANG_OFFLINE)), nameLink.c_str(), target_guid.GetCounter(), username.c_str(), accId, security, last_ip.c_str(), last_login.c_str(), latency);
|
||||
PSendSysMessage(LANG_PINFO_ACCOUNT, (target ? "" : GetMangosString(LANG_OFFLINE)), nameLink.c_str(), target_guid.GetCounter(), username.c_str(), accId, security, last_ip.c_str(), last_login.c_str(), latency);
|
||||
|
||||
std::string timeStr = secsToTimeString(total_player_time,true,true);
|
||||
uint32 gold = money /GOLD;
|
||||
std::string timeStr = secsToTimeString(total_player_time, true, true);
|
||||
uint32 gold = money / GOLD;
|
||||
uint32 silv = (money % GOLD) / SILVER;
|
||||
uint32 copp = (money % GOLD) % SILVER;
|
||||
PSendSysMessage(LANG_PINFO_LEVEL, timeStr.c_str(), level, gold,silv,copp);
|
||||
PSendSysMessage(LANG_PINFO_LEVEL, timeStr.c_str(), level, gold, silv, copp);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -2696,7 +2696,7 @@ bool ChatHandler::HandleTicketCommand(char* args)
|
|||
return false;
|
||||
|
||||
// mgr numbering tickets start from 0
|
||||
ticket = sTicketMgr.GetGMTicketByOrderPos(num-1);
|
||||
ticket = sTicketMgr.GetGMTicketByOrderPos(num - 1);
|
||||
|
||||
if (!ticket)
|
||||
{
|
||||
|
|
@ -2743,7 +2743,7 @@ bool ChatHandler::HandleTicketCommand(char* args)
|
|||
return false;
|
||||
|
||||
// mgr numbering tickets start from 0
|
||||
GMTicket* ticket = sTicketMgr.GetGMTicketByOrderPos(num-1);
|
||||
GMTicket* ticket = sTicketMgr.GetGMTicketByOrderPos(num - 1);
|
||||
if (!ticket)
|
||||
{
|
||||
PSendSysMessage(LANG_COMMAND_TICKETNOTEXIST, num);
|
||||
|
|
@ -2794,11 +2794,11 @@ bool ChatHandler::HandleDelTicketCommand(char* args)
|
|||
// delticket #num
|
||||
if (ExtractUInt32(&px, num))
|
||||
{
|
||||
if (num ==0)
|
||||
if (num == 0)
|
||||
return false;
|
||||
|
||||
// mgr numbering tickets start from 0
|
||||
GMTicket* ticket = sTicketMgr.GetGMTicketByOrderPos(num-1);
|
||||
GMTicket* ticket = sTicketMgr.GetGMTicketByOrderPos(num - 1);
|
||||
|
||||
if (!ticket)
|
||||
{
|
||||
|
|
@ -2838,7 +2838,7 @@ bool ChatHandler::HandleDelTicketCommand(char* args)
|
|||
|
||||
std::string nameLink = playerLink(target_name);
|
||||
|
||||
PSendSysMessage(LANG_COMMAND_TICKETPLAYERDEL,nameLink.c_str());
|
||||
PSendSysMessage(LANG_COMMAND_TICKETPLAYERDEL, nameLink.c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -3001,7 +3001,7 @@ bool ChatHandler::HandleWpAddCommand(char* args)
|
|||
target->SaveToDB();
|
||||
}
|
||||
else
|
||||
WorldDatabase.PExecuteLog("UPDATE creature SET MovementType=%u WHERE guid=%u", WAYPOINT_MOTION_TYPE,lowguid);
|
||||
WorldDatabase.PExecuteLog("UPDATE creature SET MovementType=%u WHERE guid=%u", WAYPOINT_MOTION_TYPE, lowguid);
|
||||
|
||||
PSendSysMessage(LANG_WAYPOINT_ADDED, point, lowguid);
|
||||
|
||||
|
|
@ -3244,7 +3244,7 @@ bool ChatHandler::HandleWpModifyCommand(char* args)
|
|||
if (!wpGuid)
|
||||
return false;
|
||||
|
||||
PSendSysMessage(LANG_WAYPOINT_ADDED_NO, point+1);
|
||||
PSendSysMessage(LANG_WAYPOINT_ADDED_NO, point + 1);
|
||||
return true;
|
||||
} // add
|
||||
|
||||
|
|
@ -3282,7 +3282,7 @@ bool ChatHandler::HandleWpModifyCommand(char* args)
|
|||
if (npcCreature)
|
||||
{
|
||||
// Any waypoints left?
|
||||
QueryResult* result2 = WorldDatabase.PQuery("SELECT point FROM creature_movement WHERE id = '%u'",lowguid);
|
||||
QueryResult* result2 = WorldDatabase.PQuery("SELECT point FROM creature_movement WHERE id = '%u'", lowguid);
|
||||
if (!result2)
|
||||
{
|
||||
npcCreature->SetDefaultMovementType(RANDOM_MOTION_TYPE);
|
||||
|
|
@ -3556,7 +3556,7 @@ bool ChatHandler::HandleWpShowCommand(char* args)
|
|||
uint32 spell = fields[4].GetUInt32();
|
||||
uint32 textid[MAX_WAYPOINT_TEXT];
|
||||
for (int i = 0; i < MAX_WAYPOINT_TEXT; ++i)
|
||||
textid[i] = fields[5+i].GetUInt32();
|
||||
textid[i] = fields[5 + i].GetUInt32();
|
||||
uint32 model1 = fields[10].GetUInt32();
|
||||
uint32 model2 = fields[11].GetUInt32();
|
||||
|
||||
|
|
@ -3570,7 +3570,7 @@ bool ChatHandler::HandleWpShowCommand(char* args)
|
|||
PSendSysMessage(LANG_WAYPOINT_INFO_EMOTE, emote);
|
||||
PSendSysMessage(LANG_WAYPOINT_INFO_SPELL, spell);
|
||||
for (int i = 0; i < MAX_WAYPOINT_TEXT; ++i)
|
||||
PSendSysMessage(LANG_WAYPOINT_INFO_TEXT, i+1, textid[i], (textid[i] ? GetMangosString(textid[i]) : ""));
|
||||
PSendSysMessage(LANG_WAYPOINT_INFO_TEXT, i + 1, textid[i], (textid[i] ? GetMangosString(textid[i]) : ""));
|
||||
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
|
@ -3583,7 +3583,7 @@ bool ChatHandler::HandleWpShowCommand(char* args)
|
|||
{
|
||||
PSendSysMessage("DEBUG: wp on, GUID: %u", lowguid);
|
||||
|
||||
QueryResult* result = WorldDatabase.PQuery("SELECT point, position_x,position_y,position_z FROM creature_movement WHERE id = '%u'",lowguid);
|
||||
QueryResult* result = WorldDatabase.PQuery("SELECT point, position_x,position_y,position_z FROM creature_movement WHERE id = '%u'", lowguid);
|
||||
if (!result)
|
||||
{
|
||||
PSendSysMessage(LANG_WAYPOINT_NOTFOUND, lowguid);
|
||||
|
|
@ -3650,7 +3650,7 @@ bool ChatHandler::HandleWpShowCommand(char* args)
|
|||
|
||||
wpCreature->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), chr->GetPhaseMaskForSpawn());
|
||||
// To call _LoadGoods(); _LoadQuests(); CreateTrainerSpells();
|
||||
wpCreature->LoadFromDB(wpCreature->GetGUIDLow(),map);
|
||||
wpCreature->LoadFromDB(wpCreature->GetGUIDLow(), map);
|
||||
map->Add(wpCreature);
|
||||
//wpCreature->GetMap()->Add(wpCreature);
|
||||
}
|
||||
|
|
@ -3665,7 +3665,7 @@ bool ChatHandler::HandleWpShowCommand(char* args)
|
|||
{
|
||||
PSendSysMessage("DEBUG: wp first, GUID: %u", lowguid);
|
||||
|
||||
QueryResult* result = WorldDatabase.PQuery("SELECT position_x,position_y,position_z FROM creature_movement WHERE point='1' AND id = '%u'",lowguid);
|
||||
QueryResult* result = WorldDatabase.PQuery("SELECT position_x,position_y,position_z FROM creature_movement WHERE point='1' AND id = '%u'", lowguid);
|
||||
if (!result)
|
||||
{
|
||||
PSendSysMessage(LANG_WAYPOINT_NOTFOUND, lowguid);
|
||||
|
|
@ -3930,7 +3930,7 @@ bool ChatHandler::HandleWpImportCommand(char* args)
|
|||
{
|
||||
while (! infile.eof())
|
||||
{
|
||||
getline(infile,line);
|
||||
getline(infile, line);
|
||||
//cout << line << endl;
|
||||
QueryResult* result = WorldDatabase.Query(line.c_str());
|
||||
delete result;
|
||||
|
|
@ -4102,7 +4102,7 @@ bool ChatHandler::HandleLookupEventCommand(char* args)
|
|||
std::wstring wnamepart;
|
||||
|
||||
// converting string that we try to find to lower case
|
||||
if (!Utf8toWStr(namepart,wnamepart))
|
||||
if (!Utf8toWStr(namepart, wnamepart))
|
||||
return false;
|
||||
|
||||
wstrToLower(wnamepart);
|
||||
|
|
@ -4135,7 +4135,7 @@ bool ChatHandler::HandleLookupEventCommand(char* args)
|
|||
}
|
||||
}
|
||||
|
||||
if (counter==0)
|
||||
if (counter == 0)
|
||||
SendSysMessage(LANG_NOEVENTFOUND);
|
||||
|
||||
return true;
|
||||
|
|
@ -4179,7 +4179,7 @@ bool ChatHandler::HandleEventListCommand(char* args)
|
|||
++counter;
|
||||
}
|
||||
|
||||
if (counter==0)
|
||||
if (counter == 0)
|
||||
SendSysMessage(LANG_NOEVENTFOUND);
|
||||
|
||||
return true;
|
||||
|
|
@ -4212,14 +4212,14 @@ bool ChatHandler::HandleEventInfoCommand(char* args)
|
|||
std::string endTimeStr = TimeToTimestampStr(eventData.end);
|
||||
|
||||
uint32 delay = sGameEventMgr.NextCheck(event_id);
|
||||
time_t nextTime = time(NULL)+delay;
|
||||
std::string nextStr = nextTime >= eventData.start && nextTime < eventData.end ? TimeToTimestampStr(time(NULL)+delay) : "-";
|
||||
time_t nextTime = time(NULL) + delay;
|
||||
std::string nextStr = nextTime >= eventData.start && nextTime < eventData.end ? TimeToTimestampStr(time(NULL) + delay) : "-";
|
||||
|
||||
std::string occurenceStr = secsToTimeString(eventData.occurence * MINUTE);
|
||||
std::string lengthStr = secsToTimeString(eventData.length * MINUTE);
|
||||
|
||||
PSendSysMessage(LANG_EVENT_INFO,event_id,eventData.description.c_str(),activeStr,
|
||||
startTimeStr.c_str(),endTimeStr.c_str(),occurenceStr.c_str(),lengthStr.c_str(),
|
||||
PSendSysMessage(LANG_EVENT_INFO, event_id, eventData.description.c_str(), activeStr,
|
||||
startTimeStr.c_str(), endTimeStr.c_str(), occurenceStr.c_str(), lengthStr.c_str(),
|
||||
nextStr.c_str());
|
||||
return true;
|
||||
}
|
||||
|
|
@ -4253,13 +4253,13 @@ bool ChatHandler::HandleEventStartCommand(char* args)
|
|||
|
||||
if (sGameEventMgr.IsActiveEvent(event_id))
|
||||
{
|
||||
PSendSysMessage(LANG_EVENT_ALREADY_ACTIVE,event_id);
|
||||
PSendSysMessage(LANG_EVENT_ALREADY_ACTIVE, event_id);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
PSendSysMessage(LANG_EVENT_STARTED, event_id, eventData.description.c_str());
|
||||
sGameEventMgr.StartEvent(event_id,true);
|
||||
sGameEventMgr.StartEvent(event_id, true);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -4292,13 +4292,13 @@ bool ChatHandler::HandleEventStopCommand(char* args)
|
|||
|
||||
if (!sGameEventMgr.IsActiveEvent(event_id))
|
||||
{
|
||||
PSendSysMessage(LANG_EVENT_NOT_ACTIVE,event_id);
|
||||
PSendSysMessage(LANG_EVENT_NOT_ACTIVE, event_id);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
PSendSysMessage(LANG_EVENT_STOPPED, event_id, eventData.description.c_str());
|
||||
sGameEventMgr.StopEvent(event_id,true);
|
||||
sGameEventMgr.StopEvent(event_id, true);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -4317,7 +4317,7 @@ bool ChatHandler::HandleCombatStopCommand(char* args)
|
|||
return true;
|
||||
}
|
||||
|
||||
void ChatHandler::HandleLearnSkillRecipesHelper(Player* player,uint32 skill_id)
|
||||
void ChatHandler::HandleLearnSkillRecipesHelper(Player* player, uint32 skill_id)
|
||||
{
|
||||
uint32 classmask = player->getClassMask();
|
||||
|
||||
|
|
@ -4344,7 +4344,7 @@ void ChatHandler::HandleLearnSkillRecipesHelper(Player* player,uint32 skill_id)
|
|||
continue;
|
||||
|
||||
SpellEntry const* spellInfo = sSpellStore.LookupEntry(skillLine->spellId);
|
||||
if (!spellInfo || !SpellMgr::IsSpellValid(spellInfo,player,false))
|
||||
if (!spellInfo || !SpellMgr::IsSpellValid(spellInfo, player, false))
|
||||
continue;
|
||||
|
||||
player->learnSpell(skillLine->spellId, false);
|
||||
|
|
@ -4362,7 +4362,7 @@ bool ChatHandler::HandleLearnAllCraftsCommand(char* /*args*/)
|
|||
if ((skillInfo->categoryId == SKILL_CATEGORY_PROFESSION || skillInfo->categoryId == SKILL_CATEGORY_SECONDARY) &&
|
||||
skillInfo->canLink) // only prof. with recipes have
|
||||
{
|
||||
HandleLearnSkillRecipesHelper(m_session->GetPlayer(),skillInfo->id);
|
||||
HandleLearnSkillRecipesHelper(m_session->GetPlayer(), skillInfo->id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -4417,7 +4417,7 @@ bool ChatHandler::HandleLearnAllRecipesCommand(char* args)
|
|||
loc = 0;
|
||||
for (; loc < MAX_LOCALE; ++loc)
|
||||
{
|
||||
if (loc==GetSessionDbcLocale())
|
||||
if (loc == GetSessionDbcLocale())
|
||||
continue;
|
||||
|
||||
name = skillInfo->name[loc];
|
||||
|
|
@ -4439,7 +4439,7 @@ bool ChatHandler::HandleLearnAllRecipesCommand(char* args)
|
|||
if (!targetSkillInfo)
|
||||
return false;
|
||||
|
||||
HandleLearnSkillRecipesHelper(target,targetSkillInfo->id);
|
||||
HandleLearnSkillRecipesHelper(target, targetSkillInfo->id);
|
||||
|
||||
uint16 maxLevel = target->GetPureMaxSkillValue(targetSkillInfo->id);
|
||||
target->SetSkill(targetSkillInfo->id, maxLevel, maxLevel);
|
||||
|
|
@ -4460,7 +4460,7 @@ bool ChatHandler::HandleLookupAccountEmailCommand(char* args)
|
|||
std::string email = emailStr;
|
||||
LoginDatabase.escape_string(email);
|
||||
// 0 1 2 3 4
|
||||
QueryResult* result = LoginDatabase.PQuery("SELECT id, username, last_ip, gmlevel, expansion FROM account WHERE email "_LIKE_" "_CONCAT3_("'%%'","'%s'","'%%'"), email.c_str());
|
||||
QueryResult* result = LoginDatabase.PQuery("SELECT id, username, last_ip, gmlevel, expansion FROM account WHERE email "_LIKE_" "_CONCAT3_("'%%'", "'%s'", "'%%'"), email.c_str());
|
||||
|
||||
return ShowAccountListHelper(result, &limit);
|
||||
}
|
||||
|
|
@ -4479,9 +4479,9 @@ bool ChatHandler::HandleLookupAccountIpCommand(char* args)
|
|||
LoginDatabase.escape_string(ip);
|
||||
|
||||
// 0 1 2 3 4
|
||||
QueryResult* result = LoginDatabase.PQuery("SELECT id, username, last_ip, gmlevel, expansion FROM account WHERE last_ip "_LIKE_" "_CONCAT3_("'%%'","'%s'","'%%'"), ip.c_str());
|
||||
QueryResult* result = LoginDatabase.PQuery("SELECT id, username, last_ip, gmlevel, expansion FROM account WHERE last_ip "_LIKE_" "_CONCAT3_("'%%'", "'%s'", "'%%'"), ip.c_str());
|
||||
|
||||
return ShowAccountListHelper(result,&limit);
|
||||
return ShowAccountListHelper(result, &limit);
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleLookupAccountNameCommand(char* args)
|
||||
|
|
@ -4500,7 +4500,7 @@ bool ChatHandler::HandleLookupAccountNameCommand(char* args)
|
|||
|
||||
LoginDatabase.escape_string(account);
|
||||
// 0 1 2 3 4
|
||||
QueryResult* result = LoginDatabase.PQuery("SELECT id, username, last_ip, gmlevel, expansion FROM account WHERE username "_LIKE_" "_CONCAT3_("'%%'","'%s'","'%%'"), account.c_str());
|
||||
QueryResult* result = LoginDatabase.PQuery("SELECT id, username, last_ip, gmlevel, expansion FROM account WHERE username "_LIKE_" "_CONCAT3_("'%%'", "'%s'", "'%%'"), account.c_str());
|
||||
|
||||
return ShowAccountListHelper(result, &limit);
|
||||
}
|
||||
|
|
@ -4542,10 +4542,10 @@ bool ChatHandler::ShowAccountListHelper(QueryResult* result, uint32* limit, bool
|
|||
|
||||
if (m_session)
|
||||
PSendSysMessage(LANG_ACCOUNT_LIST_LINE_CHAT,
|
||||
account,fields[1].GetString(),char_name,fields[2].GetString(),fields[3].GetUInt32(),fields[4].GetUInt32());
|
||||
account, fields[1].GetString(), char_name, fields[2].GetString(), fields[3].GetUInt32(), fields[4].GetUInt32());
|
||||
else
|
||||
PSendSysMessage(LANG_ACCOUNT_LIST_LINE_CONSOLE,
|
||||
account,fields[1].GetString(),char_name,fields[2].GetString(),fields[3].GetUInt32(),fields[4].GetUInt32());
|
||||
account, fields[1].GetString(), char_name, fields[2].GetString(), fields[3].GetUInt32(), fields[4].GetUInt32());
|
||||
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
|
@ -4571,7 +4571,7 @@ bool ChatHandler::HandleLookupPlayerIpCommand(char* args)
|
|||
std::string ip = ipStr;
|
||||
LoginDatabase.escape_string(ip);
|
||||
|
||||
QueryResult* result = LoginDatabase.PQuery("SELECT id,username FROM account WHERE last_ip "_LIKE_" "_CONCAT3_("'%%'","'%s'","'%%'"), ip.c_str());
|
||||
QueryResult* result = LoginDatabase.PQuery("SELECT id,username FROM account WHERE last_ip "_LIKE_" "_CONCAT3_("'%%'", "'%s'", "'%%'"), ip.c_str());
|
||||
|
||||
return LookupPlayerSearchCommand(result, &limit);
|
||||
}
|
||||
|
|
@ -4592,7 +4592,7 @@ bool ChatHandler::HandleLookupPlayerAccountCommand(char* args)
|
|||
|
||||
LoginDatabase.escape_string(account);
|
||||
|
||||
QueryResult* result = LoginDatabase.PQuery("SELECT id,username FROM account WHERE username "_LIKE_" "_CONCAT3_("'%%'","'%s'","'%%'"), account.c_str());
|
||||
QueryResult* result = LoginDatabase.PQuery("SELECT id,username FROM account WHERE username "_LIKE_" "_CONCAT3_("'%%'", "'%s'", "'%%'"), account.c_str());
|
||||
|
||||
return LookupPlayerSearchCommand(result, &limit);
|
||||
}
|
||||
|
|
@ -4610,7 +4610,7 @@ bool ChatHandler::HandleLookupPlayerEmailCommand(char* args)
|
|||
std::string email = emailStr;
|
||||
LoginDatabase.escape_string(email);
|
||||
|
||||
QueryResult* result = LoginDatabase.PQuery("SELECT id,username FROM account WHERE email "_LIKE_" "_CONCAT3_("'%%'","'%s'","'%%'"), email.c_str());
|
||||
QueryResult* result = LoginDatabase.PQuery("SELECT id,username FROM account WHERE email "_LIKE_" "_CONCAT3_("'%%'", "'%s'", "'%%'"), email.c_str());
|
||||
|
||||
return LookupPlayerSearchCommand(result, &limit);
|
||||
}
|
||||
|
|
@ -4646,8 +4646,8 @@ bool ChatHandler::LookupPlayerSearchCommand(QueryResult* result, uint32* limit)
|
|||
{
|
||||
if (chars->GetRowCount())
|
||||
{
|
||||
PSendSysMessage(LANG_LOOKUP_PLAYER_ACCOUNT,acc_name.c_str(),acc_id);
|
||||
ShowPlayerListHelper(chars,limit,true,false);
|
||||
PSendSysMessage(LANG_LOOKUP_PLAYER_ACCOUNT, acc_name.c_str(), acc_id);
|
||||
ShowPlayerListHelper(chars, limit, true, false);
|
||||
}
|
||||
else
|
||||
delete chars;
|
||||
|
|
@ -4705,7 +4705,7 @@ bool ChatHandler::HandleLookupPoolCommand(char* args)
|
|||
++counter;
|
||||
}
|
||||
|
||||
if (counter==0)
|
||||
if (counter == 0)
|
||||
SendSysMessage(LANG_NO_POOL);
|
||||
|
||||
return true;
|
||||
|
|
@ -4736,7 +4736,7 @@ bool ChatHandler::HandlePoolListCommand(char* args)
|
|||
}
|
||||
}
|
||||
|
||||
if (counter==0)
|
||||
if (counter == 0)
|
||||
PSendSysMessage(LANG_NO_POOL_FOR_MAP, mapState->GetMapEntry()->name[GetSessionDbcLocale()], mapState->GetMapId());
|
||||
|
||||
return true;
|
||||
|
|
@ -5062,18 +5062,18 @@ bool ChatHandler::HandleLookupTitleCommand(char* args)
|
|||
{
|
||||
char const* knownStr = target && target->HasTitle(titleInfo) ? GetMangosString(LANG_KNOWN) : "";
|
||||
|
||||
char const* activeStr = target && target->GetUInt32Value(PLAYER_CHOSEN_TITLE)==titleInfo->bit_index
|
||||
char const* activeStr = target && target->GetUInt32Value(PLAYER_CHOSEN_TITLE) == titleInfo->bit_index
|
||||
? GetMangosString(LANG_ACTIVE)
|
||||
: "";
|
||||
|
||||
char titleNameStr[80];
|
||||
snprintf(titleNameStr,80,name.c_str(),targetName);
|
||||
snprintf(titleNameStr, 80, name.c_str(), targetName);
|
||||
|
||||
// send title in "id (idx:idx) - [namedlink locale]" format
|
||||
if (m_session)
|
||||
PSendSysMessage(LANG_TITLE_LIST_CHAT,id,titleInfo->bit_index,id,titleNameStr,localeNames[loc],knownStr,activeStr);
|
||||
PSendSysMessage(LANG_TITLE_LIST_CHAT, id, titleInfo->bit_index, id, titleNameStr, localeNames[loc], knownStr, activeStr);
|
||||
else
|
||||
PSendSysMessage(LANG_TITLE_LIST_CONSOLE,id,titleInfo->bit_index,titleNameStr,localeNames[loc],knownStr,activeStr);
|
||||
PSendSysMessage(LANG_TITLE_LIST_CONSOLE, id, titleInfo->bit_index, titleNameStr, localeNames[loc], knownStr, activeStr);
|
||||
|
||||
++counter;
|
||||
}
|
||||
|
|
@ -5122,7 +5122,7 @@ bool ChatHandler::HandleTitlesAddCommand(char* args)
|
|||
|
||||
char const* targetName = target->GetName();
|
||||
char titleNameStr[80];
|
||||
snprintf(titleNameStr,80,titleInfo->name[GetSessionDbcLocale()],targetName);
|
||||
snprintf(titleNameStr, 80, titleInfo->name[GetSessionDbcLocale()], targetName);
|
||||
|
||||
target->SetTitle(titleInfo);
|
||||
PSendSysMessage(LANG_TITLE_ADD_RES, id, titleNameStr, tNameLink.c_str());
|
||||
|
|
@ -5164,19 +5164,19 @@ bool ChatHandler::HandleTitlesRemoveCommand(char* args)
|
|||
return false;
|
||||
}
|
||||
|
||||
target->SetTitle(titleInfo,true);
|
||||
target->SetTitle(titleInfo, true);
|
||||
|
||||
std::string tNameLink = GetNameLink(target);
|
||||
|
||||
char const* targetName = target->GetName();
|
||||
char titleNameStr[80];
|
||||
snprintf(titleNameStr,80,titleInfo->name[GetSessionDbcLocale()],targetName);
|
||||
snprintf(titleNameStr, 80, titleInfo->name[GetSessionDbcLocale()], targetName);
|
||||
|
||||
PSendSysMessage(LANG_TITLE_REMOVE_RES, id, titleNameStr, tNameLink.c_str());
|
||||
|
||||
if (!target->HasTitle(target->GetInt32Value(PLAYER_CHOSEN_TITLE)))
|
||||
{
|
||||
target->SetUInt32Value(PLAYER_CHOSEN_TITLE,0);
|
||||
target->SetUInt32Value(PLAYER_CHOSEN_TITLE, 0);
|
||||
PSendSysMessage(LANG_CURRENT_TITLE_RESET, tNameLink.c_str());
|
||||
}
|
||||
|
||||
|
|
@ -5250,7 +5250,7 @@ bool ChatHandler::HandleCharacterTitlesCommand(char* args)
|
|||
: "";
|
||||
|
||||
char titleNameStr[80];
|
||||
snprintf(titleNameStr,80,name.c_str(),targetName);
|
||||
snprintf(titleNameStr, 80, name.c_str(), targetName);
|
||||
|
||||
// send title in "id (idx:idx) - [namedlink locale]" format
|
||||
if (m_session)
|
||||
|
|
@ -5299,7 +5299,7 @@ bool ChatHandler::HandleTitlesCurrentCommand(char* args)
|
|||
std::string tNameLink = GetNameLink(target);
|
||||
|
||||
target->SetTitle(titleInfo); // to be sure that title now known
|
||||
target->SetUInt32Value(PLAYER_CHOSEN_TITLE,titleInfo->bit_index);
|
||||
target->SetUInt32Value(PLAYER_CHOSEN_TITLE, titleInfo->bit_index);
|
||||
|
||||
PSendSysMessage(LANG_TITLE_CURRENT_RES, id, titleInfo->name[GetSessionDbcLocale()], tNameLink.c_str());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue