aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2009-03-31 14:08:38 -0600
committermegamage <none@none>2009-03-31 14:08:38 -0600
commitb51cea6ce48295c3ebea9b2340d76a4ab147a6e5 (patch)
tree890561d68855a87936d8b4c8a0de6b4c0e20e8bc /src
parent1fe8050b09d2d522ded639d4dacb2f354603b596 (diff)
*Remove some code which may cause crash.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/OutdoorPvP.cpp8
-rw-r--r--src/game/Pet.cpp4
-rw-r--r--src/game/Pet.h2
-rw-r--r--src/game/Player.cpp5
-rw-r--r--src/game/TemporarySummon.cpp2
5 files changed, 9 insertions, 12 deletions
diff --git a/src/game/OutdoorPvP.cpp b/src/game/OutdoorPvP.cpp
index acbc5979f84..0efa3bfdeaf 100644
--- a/src/game/OutdoorPvP.cpp
+++ b/src/game/OutdoorPvP.cpp
@@ -311,8 +311,8 @@ bool OutdoorPvPObjective::DelCreature(uint32 type)
// explicit removal from map
// beats me why this is needed, but with the recent removal "cleanup" some creatures stay in the map if "properly" deleted
// so this is a big fat workaround, if AddObjectToRemoveList and DoDelayedMovesAndRemoves worked correctly, this wouldn't be needed
- if(Map * map = MapManager::Instance().FindMap(cr->GetMapId()))
- map->Remove(cr,false);
+ //if(Map * map = MapManager::Instance().FindMap(cr->GetMapId()))
+ // map->Remove(cr,false);
// delete respawn time for this creature
WorldDatabase.PExecute("DELETE FROM creature_respawn WHERE guid = '%u'", guid);
cr->AddObjectToRemoveList();
@@ -369,8 +369,8 @@ bool OutdoorPvPObjective::DelCapturePoint()
// explicit removal from map
// beats me why this is needed, but with the recent removal "cleanup" some creatures stay in the map if "properly" deleted
// so this is a big fat workaround, if AddObjectToRemoveList and DoDelayedMovesAndRemoves worked correctly, this wouldn't be needed
- if(Map * map = MapManager::Instance().FindMap(cr->GetMapId()))
- map->Remove(cr,false);
+ //if(Map * map = MapManager::Instance().FindMap(cr->GetMapId()))
+ // map->Remove(cr,false);
// delete respawn time for this creature
WorldDatabase.PExecute("DELETE FROM creature_respawn WHERE guid = '%u'", guid);
cr->AddObjectToRemoveList();
diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp
index 74dba64bd1c..58ed8d678e4 100644
--- a/src/game/Pet.cpp
+++ b/src/game/Pet.cpp
@@ -349,8 +349,6 @@ void Pet::SavePetToDB(PetSaveMode mode)
switch(mode)
{
- case PET_SAVE_IN_STABLE_SLOT_1:
- case PET_SAVE_IN_STABLE_SLOT_2:
case PET_SAVE_NOT_IN_SLOT:
{
RemoveAllAuras();
@@ -370,8 +368,6 @@ void Pet::SavePetToDB(PetSaveMode mode)
switch(mode)
{
case PET_SAVE_AS_CURRENT:
- case PET_SAVE_IN_STABLE_SLOT_1:
- case PET_SAVE_IN_STABLE_SLOT_2:
case PET_SAVE_NOT_IN_SLOT:
{
uint32 owner = GUID_LOPART(GetOwnerGUID());
diff --git a/src/game/Pet.h b/src/game/Pet.h
index 5879208a6b8..3d1630c9ddc 100644
--- a/src/game/Pet.h
+++ b/src/game/Pet.h
@@ -39,8 +39,6 @@ enum PetSaveMode
{
PET_SAVE_AS_DELETED =-1,
PET_SAVE_AS_CURRENT = 0,
- PET_SAVE_IN_STABLE_SLOT_1 = 1,
- PET_SAVE_IN_STABLE_SLOT_2 = 2,
PET_SAVE_NOT_IN_SLOT = 3
};
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 1b885c99874..51a68dec66d 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -16493,8 +16493,9 @@ Pet* Player::GetPet() const
if(Pet* pet = ObjectAccessor::GetPet(pet_guid))
return pet;
- sLog.outError("Player::GetPet: Pet %u not exist.",GUID_LOPART(pet_guid));
- const_cast<Player*>(this)->SetPetGUID(0);
+ //there may be a guardian in slot
+ //sLog.outError("Player::GetPet: Pet %u not exist.",GUID_LOPART(pet_guid));
+ //const_cast<Player*>(this)->SetPetGUID(0);
}
return NULL;
diff --git a/src/game/TemporarySummon.cpp b/src/game/TemporarySummon.cpp
index 4ae2c86b96a..acf0dbc78ba 100644
--- a/src/game/TemporarySummon.cpp
+++ b/src/game/TemporarySummon.cpp
@@ -168,6 +168,8 @@ void TempSummon::Update( uint32 diff )
void TempSummon::InitSummon(uint32 duration)
{
+ assert(!isPet());
+
m_timer = duration;
m_lifetime = duration;