mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 13:37:00 +00:00
[10603] Replace one hard coded value w/enum name. Additional code style cleanup
Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
589c9d8a5d
commit
edbe9ed886
2 changed files with 32 additions and 29 deletions
|
|
@ -234,7 +234,7 @@ void GameObject::Update(uint32 /*p_time*/)
|
||||||
WorldPacket data(SMSG_FISH_NOT_HOOKED,0);
|
WorldPacket data(SMSG_FISH_NOT_HOOKED,0);
|
||||||
((Player*)caster)->GetSession()->SendPacket(&data);
|
((Player*)caster)->GetSession()->SendPacket(&data);
|
||||||
}
|
}
|
||||||
// can be delete
|
// can be deleted
|
||||||
m_lootState = GO_JUST_DEACTIVATED;
|
m_lootState = GO_JUST_DEACTIVATED;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -251,6 +251,7 @@ void GameObject::Update(uint32 /*p_time*/)
|
||||||
SetLootState(GO_JUST_DEACTIVATED);
|
SetLootState(GO_JUST_DEACTIVATED);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// respawn timer
|
// respawn timer
|
||||||
GetMap()->Add(this);
|
GetMap()->Add(this);
|
||||||
break;
|
break;
|
||||||
|
|
@ -378,8 +379,10 @@ void GameObject::Update(uint32 /*p_time*/)
|
||||||
if (spellId)
|
if (spellId)
|
||||||
{
|
{
|
||||||
for (GuidsSet::const_iterator itr = m_UniqueUsers.begin(); itr != m_UniqueUsers.end(); ++itr)
|
for (GuidsSet::const_iterator itr = m_UniqueUsers.begin(); itr != m_UniqueUsers.end(); ++itr)
|
||||||
|
{
|
||||||
if (Player* owner = GetMap()->GetPlayer(*itr))
|
if (Player* owner = GetMap()->GetPlayer(*itr))
|
||||||
owner->CastSpell(owner, spellId, false, NULL, NULL, GetGUID());
|
owner->CastSpell(owner, spellId, false, NULL, NULL, GetGUID());
|
||||||
|
}
|
||||||
|
|
||||||
ClearAllUsesData();
|
ClearAllUsesData();
|
||||||
}
|
}
|
||||||
|
|
@ -1299,7 +1302,7 @@ void GameObject::Use(Unit* user)
|
||||||
}
|
}
|
||||||
case GAMEOBJECT_TYPE_SPELLCASTER: //22
|
case GAMEOBJECT_TYPE_SPELLCASTER: //22
|
||||||
{
|
{
|
||||||
SetUInt32Value(GAMEOBJECT_FLAGS,2);
|
SetUInt32Value(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
|
||||||
|
|
||||||
GameObjectInfo const* info = GetGOInfo();
|
GameObjectInfo const* info = GetGOInfo();
|
||||||
if (!info)
|
if (!info)
|
||||||
|
|
@ -1372,7 +1375,7 @@ void GameObject::Use(Unit* user)
|
||||||
// 15004
|
// 15004
|
||||||
// 15005
|
// 15005
|
||||||
bg->EventPlayerClickedOnFlag(player, this);
|
bg->EventPlayerClickedOnFlag(player, this);
|
||||||
return; //we don;t need to delete flag ... it is despawned!
|
return; //we don't need to delete flag ... it is despawned!
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "10602"
|
#define REVISION_NR "10603"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue