diff options
Diffstat (limited to 'src/server/game/Scripting/MapScripts.cpp')
-rwxr-xr-x | src/server/game/Scripting/MapScripts.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/src/server/game/Scripting/MapScripts.cpp b/src/server/game/Scripting/MapScripts.cpp index 8efca3a8658..ec651439bc5 100755 --- a/src/server/game/Scripting/MapScripts.cpp +++ b/src/server/game/Scripting/MapScripts.cpp @@ -44,7 +44,7 @@ void Map::ScriptsStart(ScriptMapMap const& scripts, uint32 id, Object* source, O uint64 ownerGUID = (source->GetTypeId() == TYPEID_ITEM) ? ((Item*)source)->GetOwnerGUID() : (uint64)0; ///- Schedule script execution for all scripts in the script map - ScriptMap const *s2 = &(s->second); + ScriptMap const* s2 = &(s->second); bool immedScript = false; for (ScriptMap::const_iterator iter = s2->begin(); iter != s2->end(); ++iter) { @@ -100,7 +100,7 @@ void Map::ScriptCommandStart(ScriptInfo const& script, uint32 delay, Object* sou // Helpers for ScriptProcess method. inline Player* Map::_GetScriptPlayerSourceOrTarget(Object* source, Object* target, const ScriptInfo* scriptInfo) const { - Player *pPlayer = NULL; + Player* pPlayer = NULL; if (!source && !target) sLog->outError("%s source and target objects are NULL.", scriptInfo->GetDebugInfo().c_str()); else @@ -122,7 +122,7 @@ inline Player* Map::_GetScriptPlayerSourceOrTarget(Object* source, Object* targe inline Creature* Map::_GetScriptCreatureSourceOrTarget(Object* source, Object* target, const ScriptInfo* scriptInfo, bool bReverse) const { - Creature *pCreature = NULL; + Creature* pCreature = NULL; if (!source && !target) sLog->outError("%s source and target objects are NULL.", scriptInfo->GetDebugInfo().c_str()); else @@ -245,7 +245,7 @@ inline void Map::_ScriptProcessDoor(Object* source, Object* target, const Script scriptInfo->GetDebugInfo().c_str(), source->GetTypeId(), source->GetEntry(), source->GetGUIDLow()); else { - GameObject *pDoor = _FindGameObject(wSource, guid); + GameObject* pDoor = _FindGameObject(wSource, guid); if (!pDoor) sLog->outError("%s gameobject was not found (guid: %u).", scriptInfo->GetDebugInfo().c_str(), guid); else if (pDoor->GetGoType() != GAMEOBJECT_TYPE_DOOR) @@ -268,7 +268,7 @@ inline void Map::_ScriptProcessDoor(Object* source, Object* target, const Script inline GameObject* Map::_FindGameObject(WorldObject* pSearchObject, uint32 guid) const { - GameObject *pGameObject = NULL; + GameObject* pGameObject = NULL; CellPair p(Trinity::ComputeCellPair(pSearchObject->GetPositionX(), pSearchObject->GetPositionY())); Cell cell(p); @@ -376,7 +376,7 @@ void Map::ScriptsProcess() } if (step.script->Talk.Flags & SF_TALK_USE_PLAYER) { - if (Player *pSource = _GetScriptPlayerSourceOrTarget(source, target, step.script)) + if (Player* pSource = _GetScriptPlayerSourceOrTarget(source, target, step.script)) { LocaleConstant loc_idx = pSource->GetSession()->GetSessionDbLocaleIndex(); std::string text(sObjectMgr->GetTrinityString(step.script->Talk.TextID, loc_idx)); @@ -411,7 +411,7 @@ void Map::ScriptsProcess() else { // Source or target must be Creature. - if (Creature *cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script)) + if (Creature* cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script)) { uint64 targetGUID = target ? target->GetGUID() : 0; switch (step.script->Talk.ChatType) @@ -449,7 +449,7 @@ void Map::ScriptsProcess() case SCRIPT_COMMAND_EMOTE: // Source or target must be Creature. - if (Creature *cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script)) + if (Creature* cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script)) { if (step.script->Emote.Flags & SF_EMOTE_USE_STATE) cSource->SetUInt32Value(UNIT_NPC_EMOTESTATE, step.script->Emote.EmoteID); @@ -460,7 +460,7 @@ void Map::ScriptsProcess() case SCRIPT_COMMAND_FIELD_SET: // Source or target must be Creature. - if (Creature *cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script)) + if (Creature* cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script)) { // Validate field number. if (step.script->FieldSet.FieldID <= OBJECT_FIELD_ENTRY || step.script->FieldSet.FieldID >= cSource->GetValuesCount()) @@ -474,7 +474,7 @@ void Map::ScriptsProcess() case SCRIPT_COMMAND_MOVE_TO: // Source or target must be Creature. - if (Creature *cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script)) + if (Creature* cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script)) { cSource->SendMonsterMoveWithSpeed(step.script->MoveTo.DestX, step.script->MoveTo.DestY, step.script->MoveTo.DestZ, step.script->MoveTo.TravelTime); cSource->GetMap()->CreatureRelocation(cSource, step.script->MoveTo.DestX, step.script->MoveTo.DestY, step.script->MoveTo.DestZ, 0); @@ -483,7 +483,7 @@ void Map::ScriptsProcess() case SCRIPT_COMMAND_FLAG_SET: // Source or target must be Creature. - if (Creature *cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script)) + if (Creature* cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script)) { // Validate field number. if (step.script->FlagToggle.FieldID <= OBJECT_FIELD_ENTRY || step.script->FlagToggle.FieldID >= cSource->GetValuesCount()) @@ -497,7 +497,7 @@ void Map::ScriptsProcess() case SCRIPT_COMMAND_FLAG_REMOVE: // Source or target must be Creature. - if (Creature *cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script)) + if (Creature* cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script)) { // Validate field number. if (step.script->FlagToggle.FieldID <= OBJECT_FIELD_ENTRY || step.script->FlagToggle.FieldID >= cSource->GetValuesCount()) @@ -513,13 +513,13 @@ void Map::ScriptsProcess() if (step.script->TeleportTo.Flags & SF_TELEPORT_USE_CREATURE) { // Source or target must be Creature. - if (Creature *cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script, true)) + if (Creature* cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script, true)) cSource->NearTeleportTo(step.script->TeleportTo.DestX, step.script->TeleportTo.DestY, step.script->TeleportTo.DestZ, step.script->TeleportTo.Orientation); } else { // Source or target must be Player. - if (Player *pSource = _GetScriptPlayerSourceOrTarget(source, target, step.script)) + if (Player* pSource = _GetScriptPlayerSourceOrTarget(source, target, step.script)) pSource->TeleportTo(step.script->TeleportTo.MapID, step.script->TeleportTo.DestX, step.script->TeleportTo.DestY, step.script->TeleportTo.DestZ, step.script->TeleportTo.Orientation); } break; @@ -585,7 +585,7 @@ void Map::ScriptsProcess() case SCRIPT_COMMAND_KILL_CREDIT: // Source or target must be Player. - if (Player *pSource = _GetScriptPlayerSourceOrTarget(source, target, step.script)) + if (Player* pSource = _GetScriptPlayerSourceOrTarget(source, target, step.script)) { if (step.script->KillCredit.Flags & SF_KILLCREDIT_REWARD_GROUP) pSource->RewardPlayerAndGroupAtEvent(step.script->KillCredit.CreatureEntry, pSource); @@ -604,7 +604,7 @@ void Map::ScriptsProcess() // Source or target must be WorldObject. if (WorldObject* pSummoner = _GetScriptWorldObject(source, true, step.script)) { - GameObject *pGO = _FindGameObject(pSummoner, step.script->RespawnGameobject.GOGuid); + GameObject* pGO = _FindGameObject(pSummoner, step.script->RespawnGameobject.GOGuid); if (!pGO) { sLog->outError("%s gameobject was not found (guid: %u).", step.script->GetDebugInfo().c_str(), step.script->RespawnGameobject.GOGuid); @@ -661,7 +661,7 @@ void Map::ScriptsProcess() case SCRIPT_COMMAND_ACTIVATE_OBJECT: // Source must be Unit. - if (Unit *pSource = _GetScriptUnit(source, true, step.script)) + if (Unit* pSource = _GetScriptUnit(source, true, step.script)) { // Target must be GameObject. if (!target) @@ -677,7 +677,7 @@ void Map::ScriptsProcess() break; } - if (GameObject *pGO = target->ToGameObject()) + if (GameObject* pGO = target->ToGameObject()) pGO->Use(pSource); } break; @@ -686,7 +686,7 @@ void Map::ScriptsProcess() { // Source (datalong2 != 0) or target (datalong2 == 0) must be Unit. bool bReverse = step.script->RemoveAura.Flags & SF_REMOVEAURA_REVERSE; - if (Unit *pTarget = _GetScriptUnit(bReverse ? source : target, bReverse, step.script)) + if (Unit* pTarget = _GetScriptUnit(bReverse ? source : target, bReverse, step.script)) pTarget->RemoveAurasDueToSpell(step.script->RemoveAura.SpellID); break; } @@ -842,7 +842,7 @@ void Map::ScriptsProcess() } //Lets choose our ScriptMap map - ScriptMapMap *datamap = GetScriptsMapByType(ScriptsType(step.script->CallScript.ScriptType)); + ScriptMapMap* datamap = GetScriptsMapByType(ScriptsType(step.script->CallScript.ScriptType)); //if no scriptmap present... if (!datamap) { @@ -857,7 +857,7 @@ void Map::ScriptsProcess() case SCRIPT_COMMAND_KILL: // Source or target must be Creature. - if (Creature *cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script)) + if (Creature* cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script)) { if (cSource->isDead()) sLog->outError("%s creature is already dead (Entry: %u, GUID: %u)", @@ -873,7 +873,7 @@ void Map::ScriptsProcess() case SCRIPT_COMMAND_ORIENTATION: // Source must be Unit. - if (Unit *pSource = _GetScriptUnit(source, true, step.script)) + if (Unit* pSource = _GetScriptUnit(source, true, step.script)) { if (step.script->Orientation.Flags& SF_ORIENTATION_FACE_TARGET) { @@ -893,25 +893,25 @@ void Map::ScriptsProcess() case SCRIPT_COMMAND_EQUIP: // Source must be Creature. - if (Creature *cSource = _GetScriptCreature(source, true, step.script)) + if (Creature* cSource = _GetScriptCreature(source, true, step.script)) cSource->LoadEquipment(step.script->Equip.EquipmentID); break; case SCRIPT_COMMAND_MODEL: // Source must be Creature. - if (Creature *cSource = _GetScriptCreature(source, true, step.script)) + if (Creature* cSource = _GetScriptCreature(source, true, step.script)) cSource->SetDisplayId(step.script->Model.ModelID); break; case SCRIPT_COMMAND_CLOSE_GOSSIP: // Source must be Player. - if (Player *pSource = _GetScriptPlayer(source, true, step.script)) + if (Player* pSource = _GetScriptPlayer(source, true, step.script)) pSource->PlayerTalkClass->SendCloseGossip(); break; case SCRIPT_COMMAND_PLAYMOVIE: // Source must be Player. - if (Player *pSource = _GetScriptPlayer(source, true, step.script)) + if (Player* pSource = _GetScriptPlayer(source, true, step.script)) pSource->SendMovieStart(step.script->PlayMovie.MovieID); break; |