This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/src/game/Group.cpp b/src/game/Group.cpp | |
| index a46b329..4af034b 100644 | |
| --- a/src/game/Group.cpp | |
| +++ b/src/game/Group.cpp | |
| @@ -1733,7 +1733,7 @@ bool Group::InCombatToInstance(uint32 instanceId) | |
| for(GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next()) | |
| { | |
| Player *pPlayer = itr->getSource(); | |
| - if(pPlayer->getAttackers().size() && pPlayer->GetInstanceId() == instanceId) | |
| + if(pPlayer->GetMap() && pPlayer->GetInstanceId() == instanceId && pPlayer->IsInCombat()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/src/game/Group.cpp b/src/game/Group.cpp | |
| index a46b329..4af034b 100644 | |
| --- a/src/game/Group.cpp | |
| +++ b/src/game/Group.cpp | |
| @@ -1733,7 +1733,7 @@ bool Group::InCombatToInstance(uint32 instanceId) | |
| for(GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next()) | |
| { | |
| Player *pPlayer = itr->getSource(); | |
| - if(pPlayer->getAttackers().size() && pPlayer->GetInstanceId() == instanceId) | |
| + if(pPlayer->GetMap() && pPlayer->GetInstanceId() == instanceId && pPlayer->IsInCombat()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/src/game/Group.cpp b/src/game/Group.cpp | |
| index a46b329..4af034b 100644 | |
| --- a/src/game/Group.cpp | |
| +++ b/src/game/Group.cpp | |
| @@ -1733,7 +1733,7 @@ bool Group::InCombatToInstance(uint32 instanceId) | |
| for(GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next()) | |
| { | |
| Player *pPlayer = itr->getSource(); | |
| - if(pPlayer->getAttackers().size() && pPlayer->GetInstanceId() == instanceId) | |
| + if(pPlayer->GetMap() && pPlayer->GetInstanceId() == instanceId && pPlayer->IsInCombat()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/src/game/Object.h b/src/game/Object.h | |
| index 7b06e3b..9bdcdfc 100644 | |
| --- a/src/game/Object.h | |
| +++ b/src/game/Object.h | |
| @@ -651,4 +651,20 @@ class MANGOS_DLL_SPEC WorldObject : public Object | |
| WorldUpdateCounter m_updateTracker; | |
| }; | |
| +#ifndef MAPLOCK_READ(OBJ,TYPE) | |
| +# define MAPLOCK_READ(OBJ,TYPE) Map::ReadGuard Guard(OBJ->GetMap()->GetLock(TYPE)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/src/game/Object.h b/src/game/Object.h | |
| index 7b06e3b..b9e7d64 100644 | |
| --- a/src/game/Object.h | |
| +++ b/src/game/Object.h | |
| @@ -651,4 +651,20 @@ class MANGOS_DLL_SPEC WorldObject : public Object | |
| WorldUpdateCounter m_updateTracker; | |
| }; | |
| +#ifndef MAPLOCK_READ(OBJ,TYPE) | |
| +# define MAPLOCK_READ(OBJ,TYPE) Map::ReadGuard Guard((OBJ)->GetMap()->GetLock(TYPE)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/src/game/GridMap.cpp b/src/game/GridMap.cpp | |
| index abed3a7..33a18e1 100644 | |
| --- a/src/game/GridMap.cpp | |
| +++ b/src/game/GridMap.cpp | |
| @@ -939,8 +939,10 @@ GridMapLiquidStatus TerrainInfo::getLiquidStatus(float x, float y, float z, uint | |
| { | |
| GridMapLiquidStatus result = LIQUID_MAP_NO_WATER; | |
| VMAP::IVMapManager* vmgr = VMAP::VMapFactory::createOrGetVMapManager(); | |
| - float liquid_level, ground_level = INVALID_HEIGHT_VALUE; | |
| + float liquid_level, ground_level; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp | |
| index 94949e8..ea91a68 100644 | |
| --- a/src/game/Unit.cpp | |
| +++ b/src/game/Unit.cpp | |
| @@ -7957,6 +7957,12 @@ uint32 Unit::MeleeDamageBonusDone(Unit *pVictim, uint32 pdamage,WeaponAttackType | |
| if (!pVictim || pdamage == 0 || (spellProto && spellProto->AttributesEx6 & SPELL_ATTR_EX6_NO_DMG_MODS)) | |
| return pdamage; | |
| + if (!pVictim->IsInWorld() || !pVictim->GetMap() || !GetMap()) | |
| + return pdamage; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/src/game/Map.cpp b/src/game/Map.cpp | |
| index 6a17fbc..eaa9e8c 100644 | |
| --- a/src/game/Map.cpp | |
| +++ b/src/game/Map.cpp | |
| @@ -195,6 +195,9 @@ void Map::RemoveFromGrid(Creature* obj, NGridType *grid, Cell const& cell) | |
| void Map::DeleteFromWorld(Player* pl) | |
| { | |
| sObjectAccessor.RemoveObject(pl); | |
| + | |
| + WriteGuard Guard(GetLock(MAP_LOCK_TYPE_AURAS)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/base/BSW_ai.cpp b/base/BSW_ai.cpp | |
| index de5f885..59d5145 100644 | |
| --- a/base/BSW_ai.cpp | |
| +++ b/base/BSW_ai.cpp | |
| @@ -751,9 +751,8 @@ bool BSWScriptedAI::_doAura(uint32 SpellID, Unit* pTarget, SpellEffectIndex inde | |
| } | |
| else | |
| { | |
| - aura = CreateAura(spell, index, &_basepoint, holder, pTarget); | |
| + aura = holder->CreateAura(spell, index, &_basepoint, pTarget, m_creature, NULL); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/src/game/DynamicObject.cpp b/src/game/DynamicObject.cpp | |
| index c84b2a3..f4a135b 100644 | |
| --- a/src/game/DynamicObject.cpp | |
| +++ b/src/game/DynamicObject.cpp | |
| @@ -170,7 +170,7 @@ void DynamicObject::Delay(int32 delaytime) | |
| bool foundAura = false; | |
| for (int32 i = m_effIndex + 1; i < MAX_EFFECT_INDEX; ++i) | |
| { | |
| - if ((holder->GetSpellProto()->Effect[i] == SPELL_EFFECT_PERSISTENT_AREA_AURA || holder->GetSpellProto()->Effect[i] == SPELL_EFFECT_ADD_FARSIGHT) && holder->m_auras[i]) | |
| + if ((holder->GetSpellProto()->Effect[i] == SPELL_EFFECT_PERSISTENT_AREA_AURA || holder->GetSpellProto()->Effect[i] == SPELL_EFFECT_ADD_FARSIGHT) && holder->GetAuraByEffectIndex(SpellEffectIndex(i))) |