diff options
Diffstat (limited to 'src/server/scripts/Commands')
| -rw-r--r-- | src/server/scripts/Commands/cs_account.cpp | 6 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_debug.cpp | 12 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_go.cpp | 12 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_gps.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_misc.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_modify.cpp | 8 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_npc.cpp | 4 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_quest.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_reload.cpp | 4 |
9 files changed, 26 insertions, 26 deletions
diff --git a/src/server/scripts/Commands/cs_account.cpp b/src/server/scripts/Commands/cs_account.cpp index 6db414555da..1b3454e5ae6 100644 --- a/src/server/scripts/Commands/cs_account.cpp +++ b/src/server/scripts/Commands/cs_account.cpp @@ -104,7 +104,7 @@ public: std::string password = szPassword; AccountOpResult result = AccountMgr::CreateAccount(account_name, password); - switch(result) + switch (result) { case AOR_OK: handler->PSendSysMessage(LANG_ACCOUNT_CREATED, account_name.c_str()); @@ -165,7 +165,7 @@ public: return false; AccountOpResult result = AccountMgr::DeleteAccount(account_id); - switch(result) + switch (result) { case AOR_OK: handler->PSendSysMessage(LANG_ACCOUNT_DELETED, account_name.c_str()); @@ -299,7 +299,7 @@ public: } AccountOpResult result = AccountMgr::ChangePassword(handler->GetSession()->GetAccountId(), std::string(new_pass)); - switch(result) + switch (result) { case AOR_OK: handler->SendSysMessage(LANG_COMMAND_PASSWORD); diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp index 1848e22121c..dca2f1e4f0e 100644 --- a/src/server/scripts/Commands/cs_debug.cpp +++ b/src/server/scripts/Commands/cs_debug.cpp @@ -291,7 +291,7 @@ public: else if (commentToken[1] == '/') { std::string str; - getline(ifs,str); + getline(ifs, str); continue; } // regular data @@ -558,7 +558,7 @@ public: uint8 bag_slot = container ? container->GetSlot() : uint8(INVENTORY_SLOT_BAG_0); std::string st; - switch(item->GetState()) + switch (item->GetState()) { case ITEM_UNCHANGED: st = "unchanged"; break; case ITEM_CHANGED: st = "changed"; break; @@ -1061,13 +1061,13 @@ public: if (isint32) { uint32 iValue = (uint32)atoi(py); - target->SetUInt32Value(Opcode , iValue); + target->SetUInt32Value(Opcode, iValue); handler->PSendSysMessage(LANG_SET_UINT_FIELD, GUID_LOPART(guid), Opcode, iValue); } else { float fValue = (float)atof(py); - target->SetFloatValue(Opcode , fValue); + target->SetFloatValue(Opcode, fValue); handler->PSendSysMessage(LANG_SET_FLOAT_FIELD, GUID_LOPART(guid), Opcode, fValue); } @@ -1143,7 +1143,7 @@ public: int CurrentValue = (int)handler->GetSession()->GetPlayer()->GetUInt32Value(Opcode); CurrentValue += Value; - handler->GetSession()->GetPlayer()->SetUInt32Value(Opcode , (uint32)CurrentValue); + handler->GetSession()->GetPlayer()->SetUInt32Value(Opcode, (uint32)CurrentValue); handler->PSendSysMessage(LANG_CHANGE_32BIT_FIELD, Opcode, CurrentValue); @@ -1225,7 +1225,7 @@ public: return false; uint32 iValue = Value ? 1 << (Value - 1) : 0; - target->SetUInt32Value(Opcode , iValue); + target->SetUInt32Value(Opcode, iValue); handler->PSendSysMessage(LANG_SET_32BIT_FIELD, Opcode, iValue); return true; diff --git a/src/server/scripts/Commands/cs_go.cpp b/src/server/scripts/Commands/cs_go.cpp index 9ffd366544e..118ab9eb13a 100644 --- a/src/server/scripts/Commands/cs_go.cpp +++ b/src/server/scripts/Commands/cs_go.cpp @@ -498,18 +498,18 @@ public: float z; float ort; uint32 mapid; - + if (pmapid) mapid = (uint32)atoi(pmapid); else mapid = _player->GetMapId(); - - if( port ) + + if ( port ) ort = (float)atof(port); else ort = _player->GetOrientation(); - - if( pz ) + + if ( pz ) { z = (float)atof(pz); if (!MapManager::IsValidMapCoord(mapid, x, y, z)) @@ -530,7 +530,7 @@ public: Map const* map = sMapMgr->CreateBaseMap(mapid); z = std::max(map->GetHeight(x, y, MAX_HEIGHT), map->GetWaterLevel(x, y)); } - + // stop flight if need if (_player->isInFlight()) { diff --git a/src/server/scripts/Commands/cs_gps.cpp b/src/server/scripts/Commands/cs_gps.cpp index 57b11630a85..2a270527fb8 100644 --- a/src/server/scripts/Commands/cs_gps.cpp +++ b/src/server/scripts/Commands/cs_gps.cpp @@ -129,7 +129,7 @@ public: { Player* player = handler->GetSession()->GetPlayer(); - sLog->outSQLDev("(@PATH,XX,%.3f,%.3f,%.5f,0,0,0,100,0),", player->GetPositionX(), player->GetPositionY(), player->GetPositionZ()); + sLog->outSQLDev("(@PATH, XX, %.3f, %.3f, %.5f, 0,0, 0,100, 0),", player->GetPositionX(), player->GetPositionY(), player->GetPositionZ()); handler->PSendSysMessage("Waypoint SQL written to SQL Developer log"); return true; diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index fe4dc2af1e2..7c08fe4d297 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -27,7 +27,7 @@ public: {
static ChatCommand commandTable[] =
{
- { "dev", SEC_ADMINISTRATOR, false, &HandleDevCommand, "", NULL },
+ { "dev", SEC_ADMINISTRATOR, false, &HandleDevCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
return commandTable;
diff --git a/src/server/scripts/Commands/cs_modify.cpp b/src/server/scripts/Commands/cs_modify.cpp index 1951b6cd361..28bc17a7450 100644 --- a/src/server/scripts/Commands/cs_modify.cpp +++ b/src/server/scripts/Commands/cs_modify.cpp @@ -441,12 +441,12 @@ public: else if (target->ToCreature()->isPet()) { Unit* owner = target->GetOwner(); - if (owner && owner->GetTypeId() == TYPEID_PLAYER && ((Pet* )target)->IsPermanentPetFor(owner->ToPlayer())) + if (owner && owner->GetTypeId() == TYPEID_PLAYER && ((Pet*)target)->IsPermanentPetFor(owner->ToPlayer())) { // check online security if (handler->HasLowerSecurity(owner->ToPlayer(), 0)) return false; - ((Pet* )target)->SetFreeTalentPoints(tp); + ((Pet*)target)->SetFreeTalentPoints(tp); owner->ToPlayer()->SendTalentsInfoData(true); return true; } @@ -725,7 +725,7 @@ public: uint32 num = 0; num = atoi((char*)args); - switch(num) + switch (num) { case 1: mId=14340; @@ -1282,7 +1282,7 @@ public: return false; uint32 anim_id = atoi((char*)args); - handler->GetSession()->GetPlayer()->SetUInt32Value(UNIT_NPC_EMOTESTATE , anim_id); + handler->GetSession()->GetPlayer()->SetUInt32Value(UNIT_NPC_EMOTESTATE, anim_id); return true; } diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp index b91f85ec1b6..cdb87fde354 100644 --- a/src/server/scripts/Commands/cs_npc.cpp +++ b/src/server/scripts/Commands/cs_npc.cpp @@ -952,7 +952,7 @@ public: // make some emotes char lastchar = args[strlen(args) - 1]; - switch(lastchar) + switch (lastchar) { case '?': creature->HandleEmoteCommand(EMOTE_ONESHOT_QUESTION); break; case '!': creature->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION); break; @@ -1272,7 +1272,7 @@ public: bool added = false; if (tmpItem) { - switch(SlotID) + switch (SlotID) { case 1: creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY, ItemID); diff --git a/src/server/scripts/Commands/cs_quest.cpp b/src/server/scripts/Commands/cs_quest.cpp index 5e08a1b0611..a616588367c 100644 --- a/src/server/scripts/Commands/cs_quest.cpp +++ b/src/server/scripts/Commands/cs_quest.cpp @@ -77,7 +77,7 @@ public: // check item starting quest (it can work incorrectly if added without item in inventory) ItemTemplateContainer const* itc = sObjectMgr->GetItemTemplateStore(); - ItemTemplateContainer::const_iterator result = find_if(itc->begin(), itc->end(), Finder<uint32, ItemTemplate>(entry, &ItemTemplate::StartQuest)); + ItemTemplateContainer::const_iterator result = find_if (itc->begin(), itc->end(), Finder<uint32, ItemTemplate>(entry, &ItemTemplate::StartQuest)); if (result != itc->end()) { diff --git a/src/server/scripts/Commands/cs_reload.cpp b/src/server/scripts/Commands/cs_reload.cpp index 4e7a2794f58..7784d495f80 100644 --- a/src/server/scripts/Commands/cs_reload.cpp +++ b/src/server/scripts/Commands/cs_reload.cpp @@ -226,7 +226,7 @@ public: static bool HandleReloadAllNpcCommand(ChatHandler* handler, const char* args) { - if(*args != 'a') // will be reloaded from all_gossips + if (*args != 'a') // will be reloaded from all_gossips HandleReloadNpcTrainerCommand(handler, "a"); HandleReloadNpcVendorCommand(handler, "a"); HandleReloadPointsOfInterestCommand(handler, "a"); @@ -298,7 +298,7 @@ public: { HandleReloadGossipMenuCommand(handler, "a"); HandleReloadGossipMenuOptionCommand(handler, "a"); - if(*args != 'a') // already reload from all_scripts + if (*args != 'a') // already reload from all_scripts HandleReloadPointsOfInterestCommand(handler, "a"); return true; } |
