Skip to content

Commit

Permalink
[10226] Fixed GO_JUST_DEACTIVATED for despawned by default gameobject.
Browse files Browse the repository at this point in the history
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
  • Loading branch information
Lutik authored and VladimirMangos committed Jul 19, 2010
1 parent 8961c01 commit 72e1253
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
8 changes: 1 addition & 7 deletions src/game/GameObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -417,14 +417,8 @@ void GameObject::Update(uint32 /*p_time*/)
if(!m_respawnDelayTime)
return;

if(!m_spawnedByDefault)
{
m_respawnTime = 0;
return;
}

// since pool system can fail to roll unspawned object, this one can remain spawned, so must set respawn nevertheless
m_respawnTime = time(NULL) + m_respawnDelayTime;
m_respawnTime = m_spawnedByDefault ? time(NULL) + m_respawnDelayTime : 0;

// if option not set then object will be saved at grid unload
if(sWorld.getConfig(CONFIG_BOOL_SAVE_RESPAWN_TIME_IMMEDIATLY))
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "10225"
#define REVISION_NR "10226"
#endif // __REVISION_NR_H__

2 comments on commit 72e1253

@rsa
Copy link
Contributor

@rsa rsa commented on 72e1253 Jul 19, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow! Thanks. Maybe the patch and has no relation to the infinite spawn chests, but he solved it perfectly.

@VladimirMangos
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Next commit fix its (infinity looting)

Please sign in to comment.