aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/server/game/Combat/ThreatManager.cpp4
-rwxr-xr-xsrc/server/game/Entities/Creature/Creature.cpp10
-rwxr-xr-xsrc/server/game/Entities/Unit/Unit.cpp9
-rwxr-xr-xsrc/server/game/Entities/Unit/Unit.h2
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp3
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.h1
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp2
-rw-r--r--src/server/scripts/Spells/spell_item.cpp2
-rwxr-xr-xsrc/server/shared/Debugging/Errors.h8
9 files changed, 26 insertions, 15 deletions
diff --git a/src/server/game/Combat/ThreatManager.cpp b/src/server/game/Combat/ThreatManager.cpp
index e604eaf9024..104d2d3d52b 100755
--- a/src/server/game/Combat/ThreatManager.cpp
+++ b/src/server/game/Combat/ThreatManager.cpp
@@ -535,6 +535,10 @@ void ThreatManager::processThreatEvent(ThreatRefStatusChangeEvent* threatRefStat
setCurrentVictim(NULL);
setDirty(true);
}
+ if (getOwner() && getOwner()->IsInWorld())
+ if (Unit* target = ObjectAccessor::GetUnit(*getOwner(), hostilRef->getUnitGuid()))
+ if (getOwner()->IsInMap(target))
+ getOwner()->SendRemoveFromThreatListOpcode(hostilRef);
iThreatContainer.remove(hostilRef);
iThreatOfflineContainer.addReference(hostilRef);
}
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index acdf2b16f2a..d120713636d 100755
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -468,9 +468,9 @@ void Creature::Update(uint32 diff)
switch (m_deathState)
{
- case JUST_ALIVED:
- // Must not be called, see Creature::setDeathState JUST_ALIVED -> ALIVE promoting.
- sLog->outError("Creature (GUID: %u Entry: %u) in wrong state: JUST_ALIVED (4)", GetGUIDLow(), GetEntry());
+ case JUST_RESPAWNED:
+ // Must not be called, see Creature::setDeathState JUST_RESPAWNED -> ALIVE promoting.
+ sLog->outError("Creature (GUID: %u Entry: %u) in wrong state: JUST_RESPAWNED (4)", GetGUIDLow(), GetEntry());
break;
case JUST_DIED:
// Must not be called, see Creature::setDeathState JUST_DIED -> CORPSE promoting.
@@ -1555,7 +1555,7 @@ void Creature::setDeathState(DeathState s)
Unit::setDeathState(CORPSE);
}
- else if (s == JUST_ALIVED)
+ else if (s == JUST_RESPAWNED)
{
//if (isPet())
// setActive(true);
@@ -1611,7 +1611,7 @@ void Creature::Respawn(bool force)
CreatureTemplate const* cinfo = GetCreatureTemplate();
SelectLevel(cinfo);
- setDeathState(JUST_ALIVED);
+ setDeathState(JUST_RESPAWNED);
uint32 displayID = GetNativeDisplayId();
CreatureModelInfo const* minfo = sObjectMgr->GetCreatureModelRandomGender(&displayID);
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 5f2f3bc2873..e78c18ea3de 100755
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -12835,9 +12835,8 @@ void Unit::setDeathState(DeathState s)
{
// death state needs to be updated before RemoveAllAurasOnDeath() calls HandleChannelDeathItem(..) so that
// it can be used to check creation of death items (such as soul shards).
- m_deathState = s;
- if (s != ALIVE && s != JUST_ALIVED)
+ if (s != ALIVE && s != JUST_RESPAWNED)
{
CombatStop();
DeleteThreatList();
@@ -12880,8 +12879,12 @@ void Unit::setDeathState(DeathState s)
if (ZoneScript* zoneScript = GetZoneScript() ? GetZoneScript() : (ZoneScript*)GetInstanceScript())
zoneScript->OnUnitDeath(this);
}
- else if (s == JUST_ALIVED)
+ else if (s == JUST_RESPAWNED)
+ {
RemoveFlag (UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE); // clear skinnable for creature and player (at battleground)
+ }
+
+ m_deathState = s;
}
/*########################################
diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h
index c3cfc415c41..2d6c5b1a86e 100755
--- a/src/server/game/Entities/Unit/Unit.h
+++ b/src/server/game/Entities/Unit/Unit.h
@@ -465,7 +465,7 @@ enum DeathState
JUST_DIED = 1,
CORPSE = 2,
DEAD = 3,
- JUST_ALIVED = 4,
+ JUST_RESPAWNED = 4,
};
enum UnitState
diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp
index 02782a22452..1301acf4c99 100644
--- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp
@@ -27,6 +27,7 @@ DoorData const Doors[] =
{
{GO_ICE_WALL, DATA_GARFROST, DOOR_TYPE_PASSAGE, BOUNDARY_NONE},
{GO_ICE_WALL, DATA_ICK, DOOR_TYPE_PASSAGE, BOUNDARY_NONE},
+ {GO_HALLS_OF_REFLECTION_PORTCULLIS, DATA_TYRANNUS, DOOR_TYPE_PASSAGE, BOUNDARY_NONE},
};
class instance_pit_of_saron : public InstanceMapScript
@@ -166,6 +167,7 @@ class instance_pit_of_saron : public InstanceMapScript
switch (go->GetEntry())
{
case GO_ICE_WALL:
+ case GO_HALLS_OF_REFLECTION_PORTCULLIS:
AddDoor(go, true);
break;
}
@@ -176,6 +178,7 @@ class instance_pit_of_saron : public InstanceMapScript
switch (go->GetEntry())
{
case GO_ICE_WALL:
+ case GO_HALLS_OF_REFLECTION_PORTCULLIS:
AddDoor(go, false);
break;
}
diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.h b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.h
index 4252f4f59a8..768c3ba40ec 100644
--- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.h
+++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.h
@@ -91,6 +91,7 @@ enum GameObjectIds
{
GO_SARONITE_ROCK = 196485,
GO_ICE_WALL = 201885,
+ GO_HALLS_OF_REFLECTION_PORTCULLIS = 201848,
};
#endif
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp
index 5b208768b0c..fab9a5f0740 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp
@@ -1290,7 +1290,7 @@ struct npc_argent_captainAI : public ScriptedAI
if (spell->Id == SPELL_REVIVE_CHAMPION && !IsUndead)
{
IsUndead = true;
- me->setDeathState(JUST_ALIVED);
+ me->setDeathState(JUST_RESPAWNED);
uint32 newEntry = 0;
switch (me->GetEntry())
{
diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp
index eb2d3187636..045ae5a6f9a 100644
--- a/src/server/scripts/Spells/spell_item.cpp
+++ b/src/server/scripts/Spells/spell_item.cpp
@@ -1095,7 +1095,7 @@ class spell_item_shimmering_vessel : public SpellScriptLoader
void HandleDummy(SpellEffIndex /* effIndex */)
{
if (Creature* target = GetHitCreature())
- target->setDeathState(JUST_ALIVED);
+ target->setDeathState(JUST_RESPAWNED);
}
void Register()
diff --git a/src/server/shared/Debugging/Errors.h b/src/server/shared/Debugging/Errors.h
index 6927fdb483f..48a8bda32ed 100755
--- a/src/server/shared/Debugging/Errors.h
+++ b/src/server/shared/Debugging/Errors.h
@@ -24,10 +24,10 @@
#include <ace/Stack_Trace.h>
#include <ace/OS_NS_unistd.h>
-#define WPAssert( assertion ) { if (!(assertion)) { ACE_Stack_Trace st; sLog->outError( "\n%s:%i in %s ASSERTION FAILED:\n %s\n%s\n", __FILE__, __LINE__, __FUNCTION__, #assertion, st.c_str()); assert( #assertion &&0 ); ((void(*)())NULL)();} }
-#define WPError( assertion, errmsg ) if ( ! (assertion) ) { sLog->outError( "%\n%s:%i in %s ERROR:\n %s\n", __FILE__, __LINE__, __FUNCTION__, (char *)errmsg ); assert( false ); }
-#define WPWarning( assertion, errmsg ) if ( ! (assertion) ) { sLog->outError( "\n%s:%i in %s WARNING:\n %s\n", __FILE__, __LINE__, __FUNCTION__, (char *)errmsg ); }
-#define WPFatal( assertion, errmsg ) if ( ! (assertion) ) { sLog->outError( "\n%s:%i in %s FATAL ERROR:\n %s\n", __FILE__, __LINE__, __FUNCTION__, (char *)errmsg ); ACE_OS::sleep(10); assert( #assertion &&0 ); abort(); }
+#define WPAssert(assertion) { if (!(assertion)) { ACE_Stack_Trace st; sLog->outError("\n%s:%i in %s ASSERTION FAILED:\n %s\n%s\n", __FILE__, __LINE__, __FUNCTION__, #assertion, st.c_str()); *((volatile int*)NULL) = 0; } }
+#define WPError(assertion, errmsg) { if (!(assertion)) { sLog->outError("%\n%s:%i in %s ERROR:\n %s\n", __FILE__, __LINE__, __FUNCTION__, (char *)errmsg); *((volatile int*)NULL) = 0; } }
+#define WPWarning(assertion, errmsg) { if (!(assertion)) { sLog->outError("\n%s:%i in %s WARNING:\n %s\n", __FILE__, __LINE__, __FUNCTION__, (char *)errmsg); } }
+#define WPFatal(assertion, errmsg) { if (!(assertion)) { sLog->outError("\n%s:%i in %s FATAL ERROR:\n %s\n", __FILE__, __LINE__, __FUNCTION__, (char *)errmsg); ACE_OS::sleep(10); *((volatile int*)NULL) = 0; } }
#define ASSERT WPAssert
#endif