mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[11592] More proper way exclude GO_FLAG_LOCKED | GO_FLAG_NO_INTERACT from reset in instances.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
02cbb905fa
commit
a0852287ac
2 changed files with 7 additions and 3 deletions
|
|
@ -398,9 +398,13 @@ void GameObject::Update(uint32 update_diff, uint32 /*p_time*/)
|
||||||
if (GetGOInfo()->IsDespawnAtAction() || GetGoAnimProgress() > 0)
|
if (GetGOInfo()->IsDespawnAtAction() || GetGoAnimProgress() > 0)
|
||||||
{
|
{
|
||||||
SendObjectDeSpawnAnim(GetObjectGuid());
|
SendObjectDeSpawnAnim(GetObjectGuid());
|
||||||
// reset flags: In Instances do not restore GO_FLAG_LOCKED or GO_FLAG_NO_INTERACT
|
// reset flags
|
||||||
if (GetMap()->Instanceable())
|
if (GetMap()->Instanceable())
|
||||||
SetUInt32Value(GAMEOBJECT_FLAGS, GetGOInfo()->flags & ~(GO_FLAG_LOCKED | GO_FLAG_NO_INTERACT));
|
{
|
||||||
|
// In Instances GO_FLAG_LOCKED or GO_FLAG_NO_INTERACT are not changed
|
||||||
|
uint32 currentLockOrInteractFlags = GetUInt32Value(GAMEOBJECT_FLAGS) & (GO_FLAG_LOCKED | GO_FLAG_NO_INTERACT);
|
||||||
|
SetUInt32Value(GAMEOBJECT_FLAGS, GetGOInfo()->flags & ~(GO_FLAG_LOCKED | GO_FLAG_NO_INTERACT) | currentLockOrInteractFlags);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
SetUInt32Value(GAMEOBJECT_FLAGS, GetGOInfo()->flags);
|
SetUInt32Value(GAMEOBJECT_FLAGS, GetGOInfo()->flags);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "11591"
|
#define REVISION_NR "11592"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue