mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[9201] Fix typo from [9200] and clean up code in function.
Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
95f9ec5fb2
commit
55b6b0eb26
2 changed files with 44 additions and 45 deletions
|
|
@ -873,13 +873,14 @@ void GameObject::Use(Unit* user)
|
|||
{
|
||||
case GAMEOBJECT_TYPE_DOOR: //0
|
||||
case GAMEOBJECT_TYPE_BUTTON: //1
|
||||
{
|
||||
//doors/buttons never really despawn, only reset to default state/flags
|
||||
UseDoorOrButton();
|
||||
|
||||
// activate script
|
||||
GetMap()->ScriptsStart(sGameObjectScripts, GetDBTableGUIDLow(), spellCaster, this);
|
||||
return;
|
||||
|
||||
}
|
||||
case GAMEOBJECT_TYPE_QUESTGIVER: //2
|
||||
{
|
||||
if (user->GetTypeId() != TYPEID_PLAYER)
|
||||
|
|
@ -891,8 +892,7 @@ void GameObject::Use(Unit* user)
|
|||
player->SendPreparedGossip(this);
|
||||
return;
|
||||
}
|
||||
//Sitting: Wooden bench, chairs enzz
|
||||
case GAMEOBJECT_TYPE_CHAIR: //7
|
||||
case GAMEOBJECT_TYPE_CHAIR: //7 Sitting: Wooden bench, chairs
|
||||
{
|
||||
GameObjectInfo const* info = GetGOInfo();
|
||||
if (!info)
|
||||
|
|
@ -955,9 +955,10 @@ void GameObject::Use(Unit* user)
|
|||
case GAMEOBJECT_TYPE_SPELL_FOCUS:
|
||||
{
|
||||
// triggering linked GO
|
||||
if (uint32 trapEntry = GetGOInfo()->goober.linkedTrapId)
|
||||
if (uint32 trapEntry = GetGOInfo()->spellFocus.linkedTrapId)
|
||||
TriggeringLinkedGameObject(trapEntry, user);
|
||||
|
||||
// some may be activated in addition? Conditions for this? (ex: entry 181616)
|
||||
break;
|
||||
}
|
||||
case GAMEOBJECT_TYPE_GOOBER: //10
|
||||
|
|
@ -1037,8 +1038,7 @@ void GameObject::Use(Unit* user)
|
|||
|
||||
return;
|
||||
}
|
||||
//fishing bobber
|
||||
case GAMEOBJECT_TYPE_FISHINGNODE: //17
|
||||
case GAMEOBJECT_TYPE_FISHINGNODE: //17 fishing bobber
|
||||
{
|
||||
if (user->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
|
@ -1118,7 +1118,6 @@ void GameObject::Use(Unit* user)
|
|||
player->FinishSpell(CURRENT_CHANNELED_SPELL);
|
||||
return;
|
||||
}
|
||||
|
||||
case GAMEOBJECT_TYPE_SUMMONING_RITUAL: //18
|
||||
{
|
||||
if (user->GetTypeId() != TYPEID_PLAYER)
|
||||
|
|
@ -1209,6 +1208,7 @@ void GameObject::Use(Unit* user)
|
|||
uint8 level = player->getLevel();
|
||||
if (level < info->meetingstone.minLevel || level > info->meetingstone.maxLevel)
|
||||
return;
|
||||
|
||||
level = targetPlayer->getLevel();
|
||||
if (level < info->meetingstone.minLevel || level > info->meetingstone.maxLevel)
|
||||
return;
|
||||
|
|
@ -1220,7 +1220,6 @@ void GameObject::Use(Unit* user)
|
|||
|
||||
break;
|
||||
}
|
||||
|
||||
case GAMEOBJECT_TYPE_FLAGSTAND: // 24
|
||||
{
|
||||
if (user->GetTypeId() != TYPEID_PLAYER)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "9200"
|
||||
#define REVISION_NR "9201"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue