diff options
author | Spp <none@none> | 2010-04-07 19:14:10 +0200 |
---|---|---|
committer | Spp <none@none> | 2010-04-07 19:14:10 +0200 |
commit | d19e12708001fbef2308be0e8cb5375a2ac7af48 (patch) | |
tree | 09fc8f67a6197802e0512950f0b0a3438a9834e8 /src/game/ScriptMgr.cpp | |
parent | 2e127f7a30706dc1d40c65de22ff02851732da24 (diff) |
Code style (game + scripts only):
"if(" --> "if ("
--HG--
branch : trunk
Diffstat (limited to 'src/game/ScriptMgr.cpp')
-rw-r--r-- | src/game/ScriptMgr.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/game/ScriptMgr.cpp b/src/game/ScriptMgr.cpp index ae412f61b5d..c6170a15b44 100644 --- a/src/game/ScriptMgr.cpp +++ b/src/game/ScriptMgr.cpp @@ -102,9 +102,9 @@ void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* pTarget) debug_log("TSCR: DoScriptText: text entry=%i, Sound=%u, Type=%u, Language=%u, Emote=%u", iTextEntry, pData->uiSoundId, pData->uiType, pData->uiLanguage, pData->uiEmote); - if(pData->uiSoundId) + if (pData->uiSoundId) { - if(GetSoundEntriesStore()->LookupEntry(pData->uiSoundId)) + if (GetSoundEntriesStore()->LookupEntry(pData->uiSoundId)) { pSource->SendPlaySound(pData->uiSoundId, false); } @@ -112,7 +112,7 @@ void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* pTarget) error_log("TSCR: DoScriptText entry %i tried to process invalid sound id %u.", iTextEntry, pData->uiSoundId); } - if(pData->uiEmote) + if (pData->uiEmote) { if (pSource->GetTypeId() == TYPEID_UNIT || pSource->GetTypeId() == TYPEID_PLAYER) ((Unit*)pSource)->HandleEmoteCommand(pData->uiEmote); @@ -159,12 +159,12 @@ void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* pTarget) void Script::RegisterSelf() { int id = GetScriptId(Name.c_str()); - if(id) + if (id) { m_scripts[id] = this; ++num_sc_scripts; } - else if(Name.find("example") == std::string::npos) + else if (Name.find("example") == std::string::npos) { error_db_log("TrinityScript: RegisterSelf, but script named %s does not have ScriptName assigned in database.",(this)->Name.c_str()); delete this; @@ -307,12 +307,12 @@ bool ScriptMgr::GossipSelectWithCode(Player* pPlayer, Creature* pCreature, uint3 bool ScriptMgr::GOSelect(Player* pPlayer, GameObject* pGO, uint32 uiSender, uint32 uiAction) { - if(!pGO) + if (!pGO) return false; debug_log("TSCR: Gossip selection, sender: %d, action: %d", uiSender, uiAction); Script *tmpscript = m_scripts[pGO->GetGOInfo()->ScriptId]; - if(!tmpscript || !tmpscript->pGOSelect) return false; + if (!tmpscript || !tmpscript->pGOSelect) return false; pPlayer->PlayerTalkClass->ClearMenus(); return tmpscript->pGOSelect(pPlayer, pGO, uiSender, uiAction); @@ -320,12 +320,12 @@ bool ScriptMgr::GOSelect(Player* pPlayer, GameObject* pGO, uint32 uiSender, uint bool ScriptMgr::GOSelectWithCode(Player* pPlayer, GameObject* pGO, uint32 uiSender, uint32 uiAction, const char* sCode) { - if(!pGO) + if (!pGO) return false; debug_log("TSCR: Gossip selection, sender: %d, action: %d",uiSender, uiAction); Script *tmpscript = m_scripts[pGO->GetGOInfo()->ScriptId]; - if(!tmpscript || !tmpscript->pGOSelectWithCode) return false; + if (!tmpscript || !tmpscript->pGOSelectWithCode) return false; pPlayer->PlayerTalkClass->ClearMenus(); return tmpscript->pGOSelectWithCode(pPlayer, pGO, uiSender ,uiAction, sCode); |