From 99fc17d44fec12f31c55efd6b3f60c011baeb88a Mon Sep 17 00:00:00 2001 From: Machiavelli Date: Sun, 19 Apr 2009 18:48:20 +0200 Subject: * Tabs to spaces cleanup --HG-- branch : trunk --- src/bindings/scripts/ScriptMgr.cpp | 4 +-- src/bindings/scripts/scripts/go/go_scripts.cpp | 2 +- .../old_hillsbrad/def_old_hillsbrad.h | 2 +- .../old_hillsbrad/instance_old_hillsbrad.cpp | 14 ++++----- src/game/BattleGround.cpp | 34 +++++++++++----------- src/game/BattleGround.h | 4 +-- src/game/BattleGroundAB.cpp | 2 +- src/game/Chat.cpp | 13 ++++----- src/game/Creature.cpp | 2 +- src/game/Map.h | 2 +- src/game/ObjectMgr.cpp | 20 ++++++------- src/game/Player.cpp | 2 +- src/game/Player.h | 2 +- src/game/SpellEffects.cpp | 2 +- src/game/SpellMgr.cpp | 2 +- 15 files changed, 52 insertions(+), 55 deletions(-) (limited to 'src') diff --git a/src/bindings/scripts/ScriptMgr.cpp b/src/bindings/scripts/ScriptMgr.cpp index 1e8066a5581..ba87254df99 100644 --- a/src/bindings/scripts/ScriptMgr.cpp +++ b/src/bindings/scripts/ScriptMgr.cpp @@ -2085,7 +2085,7 @@ TRINITY_DLL_EXPORT bool GOSelect( Player *player, GameObject *_GO, uint32 sender, uint32 action ) { if(!_GO) - return false; + return false; debug_log("TSCR: Gossip selection, sender: %d, action: %d",sender, action); Script *tmpscript = m_scripts[_GO->GetGOInfo()->ScriptId]; @@ -2099,7 +2099,7 @@ TRINITY_DLL_EXPORT bool GOSelectWithCode( Player *player, GameObject *_GO, uint32 sender, uint32 action, const char* sCode ) { if(!_GO) - return false; + return false; debug_log("TSCR: Gossip selection, sender: %d, action: %d",sender, action); Script *tmpscript = m_scripts[_GO->GetGOInfo()->ScriptId]; diff --git a/src/bindings/scripts/scripts/go/go_scripts.cpp b/src/bindings/scripts/scripts/go/go_scripts.cpp index 9aacd2487e9..cc64074b6bc 100644 --- a/src/bindings/scripts/scripts/go/go_scripts.cpp +++ b/src/bindings/scripts/scripts/go/go_scripts.cpp @@ -165,7 +165,7 @@ bool GOHello_go_teleporter(Player *player, GameObject* _GO) bool GOHello_go_jump_a_tron(Player *player, GameObject* _GO) { if (player->GetQuestStatus(10111) == QUEST_STATUS_INCOMPLETE) - player->CastSpell(player,33382,true); + player->CastSpell(player,33382,true); return true; } diff --git a/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/def_old_hillsbrad.h b/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/def_old_hillsbrad.h index 01c0e1334ac..b60f8eee565 100644 --- a/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/def_old_hillsbrad.h +++ b/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/def_old_hillsbrad.h @@ -13,7 +13,7 @@ #define TYPE_THRALL_PART4 6 #define DATA_THRALL 7 #define DATA_TARETHA 8 -#define DATA_EPOCH 9 +#define DATA_EPOCH 9 #define WORLD_STATE_OH 2436 #endif diff --git a/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp b/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp index 9ec75c06e0c..f18e29edf6d 100644 --- a/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp +++ b/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp @@ -28,7 +28,7 @@ EndScriptData */ #define THRALL_ENTRY 17876 #define TARETHA_ENTRY 18887 -#define EPOCH_ENTRY 18096 +#define EPOCH_ENTRY 18096 #define DRAKE_ENTRY 17848 @@ -53,7 +53,7 @@ struct TRINITY_DLL_DECL instance_old_hillsbrad : public ScriptedInstance mThrallEventCount = 0; ThrallGUID = 0; TarethaGUID = 0; - EpochGUID = 0; + EpochGUID = 0; for(uint8 i = 0; i < ENCOUNTERS; i++) Encounter[i] = NOT_STARTED; @@ -106,9 +106,9 @@ struct TRINITY_DLL_DECL instance_old_hillsbrad : public ScriptedInstance case TARETHA_ENTRY: TarethaGUID = creature->GetGUID(); break; - case EPOCH_ENTRY: - EpochGUID = creature->GetGUID(); - break; + case EPOCH_ENTRY: + EpochGUID = creature->GetGUID(); + break; } } @@ -222,8 +222,8 @@ struct TRINITY_DLL_DECL instance_old_hillsbrad : public ScriptedInstance return ThrallGUID; case DATA_TARETHA: return TarethaGUID; - case DATA_EPOCH: - return EpochGUID; + case DATA_EPOCH: + return EpochGUID; } return 0; } diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp index 2538bd3434e..c0ec88b78fb 100644 --- a/src/game/BattleGround.cpp +++ b/src/game/BattleGround.cpp @@ -524,10 +524,10 @@ void BattleGround::EndBattleGround(uint32 winner) if(!isArena()){ - if(m_score[GetTeamIndexByTeamId(ALLIANCE)] == m_score[GetTeamIndexByTeamId(HORDE)]) - almost_winning_team = 0; //no real winner - if(m_score[GetTeamIndexByTeamId(ALLIANCE)] > m_score[GetTeamIndexByTeamId(HORDE)]) - almost_winning_team = ALLIANCE; + if(m_score[GetTeamIndexByTeamId(ALLIANCE)] == m_score[GetTeamIndexByTeamId(HORDE)]) + almost_winning_team = 0; //no real winner + if(m_score[GetTeamIndexByTeamId(ALLIANCE)] > m_score[GetTeamIndexByTeamId(HORDE)]) + almost_winning_team = ALLIANCE; } @@ -572,19 +572,19 @@ void BattleGround::EndBattleGround(uint32 winner) } else if(winner !=0) { - RewardMark(plr,ITEM_LOSER_COUNT); + RewardMark(plr,ITEM_LOSER_COUNT); } - else if(winner == 0) - { - if(sWorld.getConfig(CONFIG_PREMATURE_BG_REWARD)) // We're feeling generous, giving rewards to people who not earned them ;) - { //nested ifs for the win! its boring writing that, forgive me my unfunniness - - if(almost_winning_team == team) //player's team had more points - RewardMark(plr,ITEM_WINNER_COUNT); - else - RewardMark(plr,ITEM_LOSER_COUNT); // if scores were the same, each team gets 1 mark. - } - } + else if(winner == 0) + { + if(sWorld.getConfig(CONFIG_PREMATURE_BG_REWARD)) // We're feeling generous, giving rewards to people who not earned them ;) + { //nested ifs for the win! its boring writing that, forgive me my unfunniness + + if(almost_winning_team == team) //player's team had more points + RewardMark(plr,ITEM_WINNER_COUNT); + else + RewardMark(plr,ITEM_LOSER_COUNT); // if scores were the same, each team gets 1 mark. + } + } plr->CombatStopWithPets(true); @@ -610,7 +610,7 @@ void BattleGround::EndBattleGround(uint32 winner) // this way all arena team members will get notified, not only the ones who participated in this match winner_arena_team->NotifyStatsChanged(); loser_arena_team->NotifyStatsChanged(); - sLog.outDebug("Rated arena match between %s and %s finished, winner: %s", loser_arena_team->GetName().c_str(),winner_arena_team->GetName().c_str(),winner_arena_team->GetName().c_str()); + sLog.outDebug("Rated arena match between %s and %s finished, winner: %s", loser_arena_team->GetName().c_str(),winner_arena_team->GetName().c_str(),winner_arena_team->GetName().c_str()); } // inform invited players about the removal diff --git a/src/game/BattleGround.h b/src/game/BattleGround.h index c9592cebe63..e03e36cbd1e 100644 --- a/src/game/BattleGround.h +++ b/src/game/BattleGround.h @@ -489,7 +489,7 @@ class BattleGround uint8 m_Events; bool m_BuffChange; - uint32 m_score[2]; //array that keeps general team scores, used to determine who gets most marks when bg ends prematurely + uint32 m_score[2]; //array that keeps general team scores, used to determine who gets most marks when bg ends prematurely BGHonorMode m_HonorMode; private: @@ -514,7 +514,7 @@ class BattleGround bool m_PrematureCountDown; uint32 m_PrematureCountDownTimer; char const *m_Name; - + /* Player lists */ std::vector m_ResurrectQueue; // Player GUID diff --git a/src/game/BattleGroundAB.cpp b/src/game/BattleGroundAB.cpp index 1cd5cfad420..bbaef37152f 100644 --- a/src/game/BattleGroundAB.cpp +++ b/src/game/BattleGroundAB.cpp @@ -195,7 +195,7 @@ void BattleGroundAB::Update(time_t diff) { m_lastTick[team] -= BG_AB_TickIntervals[points]; m_TeamScores[team] += BG_AB_TickPoints[points]; - m_score[team] = m_TeamScores[team]; + m_score[team] = m_TeamScores[team]; m_HonorScoreTics[team] += BG_AB_TickPoints[points]; m_ReputationScoreTics[team] += BG_AB_TickPoints[points]; if( m_ReputationScoreTics[team] >= BG_AB_ReputationScoreTicks[m_HonorMode] ) diff --git a/src/game/Chat.cpp b/src/game/Chat.cpp index 06e3b285d5a..15206f10c29 100644 --- a/src/game/Chat.cpp +++ b/src/game/Chat.cpp @@ -871,9 +871,6 @@ int ChatHandler::ParseCommands(const char* text) std::string fullcmd = text; - //if(m_session->GetSecurity() == 0) - // return 0; - /// chat case (.command or !command format) if(m_session) { @@ -895,11 +892,11 @@ int ChatHandler::ParseCommands(const char* text) ++text; if(!ExecuteCommandInTable(getCommandTable(), text, fullcmd)) - { - if(m_session && m_session->GetSecurity() == SEC_PLAYER) - return 0; - SendSysMessage(LANG_NO_CMD); - } + { + if(m_session && m_session->GetSecurity() == SEC_PLAYER) + return 0; + SendSysMessage(LANG_NO_CMD); + } return 1; } diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index f86df8485df..e7572bf5e78 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -205,7 +205,7 @@ void Creature::SearchFormation() uint32 lowguid = GetDBTableGUIDLow(); if(!lowguid) - return; + return; CreatureGroupInfoType::iterator frmdata = CreatureGroupMap.find(lowguid); if(frmdata != CreatureGroupMap.end()) diff --git a/src/game/Map.h b/src/game/Map.h index f72b0c15ec3..f117a1c1cec 100644 --- a/src/game/Map.h +++ b/src/game/Map.h @@ -277,7 +277,7 @@ class TRINITY_DLL_SPEC Map : public GridRefManager, public Trinity::O template void VisitAll(const float &x, const float &y, float radius, NOTIFIER ¬ifier); template void VisitWorld(const float &x, const float &y, float radius, NOTIFIER ¬ifier); template void VisitGrid(const float &x, const float &y, float radius, NOTIFIER ¬ifier); - CreatureGroupHolderType CreatureGroupHolder; + CreatureGroupHolderType CreatureGroupHolder; private: void LoadVMap(int pX, int pY); void LoadMap(uint32 mapid, uint32 instanceid, int x,int y); diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index 31697f31df0..752d34b2284 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -4922,9 +4922,9 @@ void ObjectMgr::LoadAccessRequirements() uint32 count = 0; - // 0 1 2 3 4 5 6 7 8 9 10 + // 0 1 2 3 4 5 6 7 8 9 10 QueryResult *result = WorldDatabase.Query("SELECT id, level_min, level_max, item, item2, heroic_key, heroic_key2, quest_done, quest_failed_text, heroic_quest_done, heroic_quest_failed_text FROM access_requirement"); - if( !result ) + if( !result ) { barGoLink bar( 1 ); @@ -5001,14 +5001,14 @@ void ObjectMgr::LoadAccessRequirements() } } - if(ar.heroicQuest) - { - if(!mQuestTemplates[ar.heroicQuest]) - { - sLog.outErrorDb("Required Heroic Quest %u not exist for trigger %u, remove heroic quest done requirement.",ar.heroicQuest,requiremt_ID); - ar.heroicQuest = 0; - } - } + if(ar.heroicQuest) + { + if(!mQuestTemplates[ar.heroicQuest]) + { + sLog.outErrorDb("Required Heroic Quest %u not exist for trigger %u, remove heroic quest done requirement.",ar.heroicQuest,requiremt_ID); + ar.heroicQuest = 0; + } + } if(ar.quest) { diff --git a/src/game/Player.cpp b/src/game/Player.cpp index d927b162d31..7837a0186eb 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -17817,7 +17817,7 @@ template void Player::UpdateVisibilityOf(T* target, UpdateData& data, std::set& visibleNow) { if(!target) - return; + return; if(HaveAtClient(target)) { if(!target->isVisibleForInState(this,true)) diff --git a/src/game/Player.h b/src/game/Player.h index 9ba6c94ae24..7d530a57228 100644 --- a/src/game/Player.h +++ b/src/game/Player.h @@ -840,7 +840,7 @@ struct AccessRequirement uint32 heroicKey2; uint32 quest; std::string questFailedText; - uint32 heroicQuest; + uint32 heroicQuest; std::string heroicQuestFailedText; }; diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 2ee6c7032b3..0022144e5b1 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -4171,7 +4171,7 @@ void Spell::SpellDamageWeaponDmg(uint32 i) { if(itr->second->GetSpellProto()->Dispel == DISPEL_POISON) { - totalDamagePercentMod *= 1.5f; // 150% if poisoned + totalDamagePercentMod *= 1.5f; // 150% if poisoned break; } } diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 30112caa75a..95ddab074b1 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -2209,7 +2209,7 @@ void SpellMgr::LoadSpellCustomAttr() case 45027: // Revitalize case 45976: // Muru Portal Channel case 39365: // Thundering Storm - case 41071: // Raise Dead + case 41071: // Raise Dead spellInfo->MaxAffectedTargets = 1; break; case 41376: // Spite -- cgit v1.2.3 From f90706f5af52696764f3d1a676dd1c4c2c22c52a Mon Sep 17 00:00:00 2001 From: "Andy@conmuc-l03" Date: Sun, 19 Apr 2009 20:11:26 +0200 Subject: workaround for demoshout & piercing howl to remove stealth --HG-- branch : trunk --- src/game/SpellAuras.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src') diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 5b75da79a21..eeb1785f5c3 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -3431,6 +3431,7 @@ void Aura::HandleAuraModDecreaseSpeed(bool /*apply*/, bool Real) if(!Real) return; + m_target->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); m_target->UpdateSpeed(MOVE_RUN, true); m_target->UpdateSpeed(MOVE_SWIM, true); m_target->UpdateSpeed(MOVE_FLIGHT, true); @@ -4628,6 +4629,28 @@ void Aura::HandleRangedAmmoHaste(bool apply, bool Real) void Aura::HandleAuraModAttackPower(bool apply, bool Real) { m_target->HandleStatModifier(UNIT_MOD_ATTACK_POWER, TOTAL_VALUE, float(GetModifierValue()), apply); + if(apply) + switch(m_spellProto->Id){ + // Warrior & Druid Demoshout should remove stealth + case 1160: + case 6190: + case 11554: + case 11555: + case 11556: + case 25202: + case 25203: + case 47437: //WotLK spell + case 99: + case 1735: + case 9490: + case 9747: + case 9898: + case 26998: + case 48559: //WotLK spell + case 48560: //WotLK spell + m_target->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); + break; + } } void Aura::HandleAuraModRangedAttackPower(bool apply, bool Real) -- cgit v1.2.3 From 45e61dd4d32f6c66a6ed407107b80edd0e9d598b Mon Sep 17 00:00:00 2001 From: megamage Date: Mon, 20 Apr 2009 09:47:02 -0500 Subject: *Fix a crash caused by stealth aura remove itself. --HG-- branch : trunk --- src/game/SpellAuras.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index eeb1785f5c3..663fa7c8125 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -3431,7 +3431,7 @@ void Aura::HandleAuraModDecreaseSpeed(bool /*apply*/, bool Real) if(!Real) return; - m_target->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); + //m_target->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); m_target->UpdateSpeed(MOVE_RUN, true); m_target->UpdateSpeed(MOVE_SWIM, true); m_target->UpdateSpeed(MOVE_FLIGHT, true); -- cgit v1.2.3 From 2649b4c44de2e1cb2fdfdfe1c08294cfe37c31d4 Mon Sep 17 00:00:00 2001 From: megamage Date: Mon, 20 Apr 2009 15:54:51 -0500 Subject: *Do not make deep (ProcDamageAndSpellFor) static. --HG-- branch : trunk --- src/game/Unit.cpp | 11 +++++------ src/game/Unit.h | 2 ++ 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 70a03d75379..72e8deb010c 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -152,7 +152,7 @@ bool IsPassiveStackableSpell( uint32 spellId ) Unit::Unit() : WorldObject(), i_motionMaster(this), m_ThreatManager(this), m_HostilRefManager(this) , m_IsInNotifyList(false), m_Notified(false), IsAIEnabled(false), NeedChangeAI(false) -, i_AI(NULL), i_disabledAI(NULL) +, i_AI(NULL), i_disabledAI(NULL), m_procDeep(0) { m_objectType |= TYPEMASK_UNIT; m_objectTypeId = TYPEID_UNIT; @@ -11409,16 +11409,15 @@ uint32 createProcExtendMask(SpellNonMeleeDamage *damageInfo, SpellMissInfo missC return procEx; } -static int deep = 0; void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, SpellEntry const * procSpell, uint32 damage ) { - deep ++; - if (deep > 5) + ++m_procDeep; + if (++m_procDeep > 5) { sLog.outError("Prevent possible stack owerflow in Unit::ProcDamageAndSpellFor"); if (procSpell) sLog.outError(" Spell %u", procSpell->Id); - deep--; + --m_procDeep; return; } // For melee/ranged based attack need update skills and set some Aura states @@ -11675,7 +11674,7 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag for(RemoveSpellList::const_iterator i = removedSpells.begin(); i != removedSpells.end();i++) RemoveAurasDueToSpell(*i); } - deep--; + --m_procDeep; } SpellSchoolMask Unit::GetMeleeDamageSchoolMask() const diff --git a/src/game/Unit.h b/src/game/Unit.h index 89c0ddad86a..0179097de77 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -1532,6 +1532,8 @@ class TRINITY_DLL_SPEC Unit : public WorldObject uint32 m_reducedThreatPercent; uint64 m_misdirectionTargetGUID; + + uint32 m_procDeep; }; namespace Trinity -- cgit v1.2.3 From dc99a44797c2a3cce989c4808caa726de5230ee7 Mon Sep 17 00:00:00 2001 From: megamage Date: Mon, 20 Apr 2009 17:37:59 -0500 Subject: *Add m_map in worldobject to make getmap faster. --HG-- branch : trunk --- src/game/Object.cpp | 7 +++++-- src/game/Object.h | 11 +++++------ 2 files changed, 10 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/game/Object.cpp b/src/game/Object.cpp index d106b578004..7ca7a58f90c 100644 --- a/src/game/Object.cpp +++ b/src/game/Object.cpp @@ -1059,6 +1059,7 @@ WorldObject::WorldObject() m_mapId = 0; m_InstanceId = 0; + m_map = NULL; m_name = ""; @@ -1555,12 +1556,14 @@ void WorldObject::SendObjectDeSpawnAnim(uint64 guid) Map* WorldObject::GetMap() const { - return MapManager::Instance().GetMap(GetMapId(), this); + if(m_map) return m_map; + else return const_cast(m_map) = MapManager::Instance().GetMap(GetMapId(), this); } Map* WorldObject::FindMap() const { - return MapManager::Instance().FindMap(GetMapId(), GetInstanceId()); + if(m_map) return m_map; + else return const_cast(m_map) = MapManager::Instance().FindMap(GetMapId(), GetInstanceId()); } Map const* WorldObject::GetBaseMap() const diff --git a/src/game/Object.h b/src/game/Object.h index ecba2a77f65..e19d9be41ce 100644 --- a/src/game/Object.h +++ b/src/game/Object.h @@ -418,8 +418,10 @@ class TRINITY_DLL_SPEC WorldObject : public Object void GetRandomPoint( float x, float y, float z, float distance, float &rand_x, float &rand_y, float &rand_z ) const; - void SetMapId(uint32 newMap) { m_mapId = newMap; } + void SetMapId(uint32 newMap) { m_mapId = newMap; m_map = NULL; } uint32 GetMapId() const { return m_mapId; } + void SetInstanceId(uint32 val) { m_InstanceId = val; m_map = NULL; } + uint32 GetInstanceId() const { return m_InstanceId; } uint32 GetZoneId() const; uint32 GetAreaId() const; @@ -467,9 +469,6 @@ class TRINITY_DLL_SPEC WorldObject : public Object virtual void SaveRespawnTime() {} - uint32 GetInstanceId() const { return m_InstanceId; } - void SetInstanceId(uint32 val) { m_InstanceId = val; } - void AddObjectToRemoveList(); // main visibility check function in normal case (ignore grey zone distance check) @@ -502,6 +501,8 @@ class TRINITY_DLL_SPEC WorldObject : public Object private: uint32 m_mapId; + uint32 m_InstanceId; + Map *m_map; float m_positionX; float m_positionY; @@ -509,8 +510,6 @@ class TRINITY_DLL_SPEC WorldObject : public Object float m_orientation; bool mSemaphoreTeleport; - - uint32 m_InstanceId; }; #endif -- cgit v1.2.3 From b7b97ffe260ca0ba0bfb6b500908ed851105647b Mon Sep 17 00:00:00 2001 From: megamage Date: Mon, 20 Apr 2009 17:48:14 -0500 Subject: *Fix a crash in HandleGossipSelectOptionOpcode. --HG-- branch : trunk --- src/game/MiscHandler.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/game/MiscHandler.cpp b/src/game/MiscHandler.cpp index 14da3a94360..1bed4c6a483 100644 --- a/src/game/MiscHandler.cpp +++ b/src/game/MiscHandler.cpp @@ -116,6 +116,7 @@ void WorldSession::HandleGossipSelectOptionOpcode( WorldPacket & recv_data ) else { sLog.outDebug( "WORLD: HandleGossipSelectOptionOpcode - unsupported GUID type for highguid %u. lowpart %u.", uint32(GUID_HIPART(guid)), uint32(GUID_LOPART(guid)) ); + return; } // remove fake death -- cgit v1.2.3 From 922453f36233835536a5a71d7b679bdf3b9d8568 Mon Sep 17 00:00:00 2001 From: megamage Date: Mon, 20 Apr 2009 17:51:49 -0500 Subject: *Do not allow process script immediately in waypoint movement to prevent crash of mtmap. --HG-- branch : trunk --- src/game/WaypointMovementGenerator.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/game/WaypointMovementGenerator.cpp b/src/game/WaypointMovementGenerator.cpp index 12b72829248..0cc32eefdf4 100644 --- a/src/game/WaypointMovementGenerator.cpp +++ b/src/game/WaypointMovementGenerator.cpp @@ -187,8 +187,9 @@ WaypointMovementGenerator::Update(Creature &unit, const uint32 &diff) if(node->delay) i_nextMoveTime.Reset(node->delay); + //note: disable "start" for mtmap if(node->event_id && rand()%100 < node->event_chance) - sWorld.ScriptsStart(sWaypointScripts, node->event_id, &unit, NULL); + sWorld.ScriptsStart(sWaypointScripts, node->event_id, &unit, NULL, false); MovementInform(unit); unit.UpdateWaypointID(i_currentNode); -- cgit v1.2.3