diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Creature.h | 2 | ||||
-rw-r--r-- | src/game/Player.cpp | 3 | ||||
-rw-r--r-- | src/game/Player.h | 2 | ||||
-rw-r--r-- | src/game/Unit.h | 2 |
4 files changed, 5 insertions, 4 deletions
diff --git a/src/game/Creature.h b/src/game/Creature.h index 6312dfbe958..7c8ad79b608 100644 --- a/src/game/Creature.h +++ b/src/game/Creature.h @@ -562,7 +562,7 @@ class TRINITY_DLL_SPEC Creature : public Unit CreatureSpellCooldowns m_CreatureCategoryCooldowns; uint32 m_GlobalCooldown; - bool canSeeOrDetect(Unit const* u, bool detect, bool inVisibleList, bool is3dDistance = true) const; + bool canSeeOrDetect(Unit const* u, bool detect, bool inVisibleList = false, bool is3dDistance = true) const; bool IsWithinSightDist(Unit const* u) const; bool canStartAttack(Unit const* u) const; float GetAttackDistance(Unit const* pl) const; diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 9bbd48e1862..cbd5003e12b 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -16036,7 +16036,8 @@ void Player::ResetInstances(uint8 method) // if the map is loaded, reset it Map *map = MapManager::Instance().FindMap(p->GetMapId(), p->GetInstanceId()); if(map && map->IsDungeon()) - ((InstanceMap*)map)->Reset(method); + if(!((InstanceMap*)map)->Reset(method)) + continue; // since this is a solo instance there should not be any players inside if(method == INSTANCE_RESET_ALL || method == INSTANCE_RESET_CHANGE_DIFFICULTY) diff --git a/src/game/Player.h b/src/game/Player.h index 55dda581261..9187ca3968d 100644 --- a/src/game/Player.h +++ b/src/game/Player.h @@ -2007,7 +2007,7 @@ class TRINITY_DLL_SPEC Player : public Unit bool HaveAtClient(WorldObject const* u) const { return u==this || m_clientGUIDs.find(u->GetGUID())!=m_clientGUIDs.end(); } - bool canSeeOrDetect(Unit const* u, bool detect, bool inVisibleList, bool is3dDistance = true) const; + bool canSeeOrDetect(Unit const* u, bool detect, bool inVisibleList = false, bool is3dDistance = true) const; bool IsVisibleInGridForPlayer(Player const* pl) const; bool IsVisibleGloballyFor(Player* pl) const; diff --git a/src/game/Unit.h b/src/game/Unit.h index 8771cff0688..0b5e4249df6 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -1224,7 +1224,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject void SetVisibility(UnitVisibility x); // common function for visibility checks for player/creatures with detection code - virtual bool canSeeOrDetect(Unit const* u, bool detect, bool inVisibleList, bool is3dDistance = true) const; + virtual bool canSeeOrDetect(Unit const* u, bool detect, bool inVisibleList = false, bool is3dDistance = true) const; bool isVisibleForOrDetect(Unit const* u, bool detect, bool inVisibleList = false, bool is3dDistance = true) const; bool canDetectInvisibilityOf(Unit const* u) const; bool canDetectStealthOf(Unit const* u, float distance) const; |