aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKudlaty <none@none>2009-08-14 00:07:14 +0200
committerKudlaty <none@none>2009-08-14 00:07:14 +0200
commitad4397b40d820cc30fe83acf982aa30d7278813e (patch)
treef45d9f80fcc71469cadb707b4761235d71e29196 /src
parentf58781dbad7ea0fdad91ebcedf6be92645189289 (diff)
parentc9ddf9258d159dc8aa5a4e29cd83c158c8479d24 (diff)
merge
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp2
-rw-r--r--src/game/Corpse.cpp8
-rw-r--r--src/game/Object.cpp8
3 files changed, 11 insertions, 7 deletions
diff --git a/src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp b/src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp
index b820b947e9e..3fca340a7b3 100644
--- a/src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp
+++ b/src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp
@@ -1012,7 +1012,7 @@ struct TRINITY_DLL_DECL npc_death_knight_initiateAI : public SpellAI
{
if (m_bIsDuelInProgress && pDoneBy->IsControlledByPlayer())
{
- if (pDoneBy->GetGUID() != m_uiDuelerGUID || pDoneBy->GetOwnerGUID() != m_uiDuelerGUID) // other players cannot help
+ if (pDoneBy->GetGUID() != m_uiDuelerGUID && pDoneBy->GetOwnerGUID() != m_uiDuelerGUID) // other players cannot help
uiDamage = 0;
else if (uiDamage >= m_creature->GetHealth())
{
diff --git a/src/game/Corpse.cpp b/src/game/Corpse.cpp
index 7fc8dc7fb50..6aec1da7ef9 100644
--- a/src/game/Corpse.cpp
+++ b/src/game/Corpse.cpp
@@ -81,10 +81,6 @@ bool Corpse::Create( uint32 guidlow, Player *owner)
{
ASSERT(owner);
- //we need to assign owner's map for corpse
- //in other way we will get a crash in Corpse::SaveToDB()
- SetMap(owner->GetMap());
-
Relocate(owner->GetPositionX(), owner->GetPositionY(), owner->GetPositionZ(), owner->GetOrientation());
if(!IsPositionValid())
@@ -94,6 +90,10 @@ bool Corpse::Create( uint32 guidlow, Player *owner)
return false;
}
+ //we need to assign owner's map for corpse
+ //in other way we will get a crash in Corpse::SaveToDB()
+ SetMap(owner->GetMap());
+
WorldObject::_Create(guidlow, HIGHGUID_CORPSE, owner->GetPhaseMask());
SetFloatValue( OBJECT_FIELD_SCALE_X, 1 );
diff --git a/src/game/Object.cpp b/src/game/Object.cpp
index 334790402b9..2e3aa8e0528 100644
--- a/src/game/Object.cpp
+++ b/src/game/Object.cpp
@@ -82,10 +82,14 @@ Object::Object( ) : m_PackGUID(sizeof(uint64)+1)
WorldObject::~WorldObject()
{
+ // this may happen because there are many !create/delete
if(m_isWorldObject && m_currMap)
{
- sLog.outCrash("Object::~Object - guid="UI64FMTD", typeid=%d, entry=%u deleted but still in map!!", GetGUID(), GetTypeId(), GetEntry());
- assert(false);
+ if(GetTypeId() == TYPEID_CORPSE)
+ {
+ sLog.outCrash("Object::~Object Corpse guid="UI64FMTD", type=%d, entry=%u deleted but still in map!!", GetGUID(), ((Corpse*)this)->GetType(), GetEntry());
+ assert(false);
+ }
ResetMap();
}
}