[9201] Fix typo from [9200] and clean up code in function.

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
NoFantasy 2010-01-17 12:02:17 +01:00
parent 95f9ec5fb2
commit 55b6b0eb26
2 changed files with 44 additions and 45 deletions

View file

@ -873,13 +873,14 @@ void GameObject::Use(Unit* user)
{ {
case GAMEOBJECT_TYPE_DOOR: //0 case GAMEOBJECT_TYPE_DOOR: //0
case GAMEOBJECT_TYPE_BUTTON: //1 case GAMEOBJECT_TYPE_BUTTON: //1
{
//doors/buttons never really despawn, only reset to default state/flags //doors/buttons never really despawn, only reset to default state/flags
UseDoorOrButton(); UseDoorOrButton();
// activate script // activate script
GetMap()->ScriptsStart(sGameObjectScripts, GetDBTableGUIDLow(), spellCaster, this); GetMap()->ScriptsStart(sGameObjectScripts, GetDBTableGUIDLow(), spellCaster, this);
return; return;
}
case GAMEOBJECT_TYPE_QUESTGIVER: //2 case GAMEOBJECT_TYPE_QUESTGIVER: //2
{ {
if (user->GetTypeId() != TYPEID_PLAYER) if (user->GetTypeId() != TYPEID_PLAYER)
@ -891,8 +892,7 @@ void GameObject::Use(Unit* user)
player->SendPreparedGossip(this); player->SendPreparedGossip(this);
return; return;
} }
//Sitting: Wooden bench, chairs enzz case GAMEOBJECT_TYPE_CHAIR: //7 Sitting: Wooden bench, chairs
case GAMEOBJECT_TYPE_CHAIR: //7
{ {
GameObjectInfo const* info = GetGOInfo(); GameObjectInfo const* info = GetGOInfo();
if (!info) if (!info)
@ -955,9 +955,10 @@ void GameObject::Use(Unit* user)
case GAMEOBJECT_TYPE_SPELL_FOCUS: case GAMEOBJECT_TYPE_SPELL_FOCUS:
{ {
// triggering linked GO // triggering linked GO
if (uint32 trapEntry = GetGOInfo()->goober.linkedTrapId) if (uint32 trapEntry = GetGOInfo()->spellFocus.linkedTrapId)
TriggeringLinkedGameObject(trapEntry, user); TriggeringLinkedGameObject(trapEntry, user);
// some may be activated in addition? Conditions for this? (ex: entry 181616)
break; break;
} }
case GAMEOBJECT_TYPE_GOOBER: //10 case GAMEOBJECT_TYPE_GOOBER: //10
@ -1037,8 +1038,7 @@ void GameObject::Use(Unit* user)
return; return;
} }
//fishing bobber case GAMEOBJECT_TYPE_FISHINGNODE: //17 fishing bobber
case GAMEOBJECT_TYPE_FISHINGNODE: //17
{ {
if (user->GetTypeId() != TYPEID_PLAYER) if (user->GetTypeId() != TYPEID_PLAYER)
return; return;
@ -1118,7 +1118,6 @@ void GameObject::Use(Unit* user)
player->FinishSpell(CURRENT_CHANNELED_SPELL); player->FinishSpell(CURRENT_CHANNELED_SPELL);
return; return;
} }
case GAMEOBJECT_TYPE_SUMMONING_RITUAL: //18 case GAMEOBJECT_TYPE_SUMMONING_RITUAL: //18
{ {
if (user->GetTypeId() != TYPEID_PLAYER) if (user->GetTypeId() != TYPEID_PLAYER)
@ -1209,6 +1208,7 @@ void GameObject::Use(Unit* user)
uint8 level = player->getLevel(); uint8 level = player->getLevel();
if (level < info->meetingstone.minLevel || level > info->meetingstone.maxLevel) if (level < info->meetingstone.minLevel || level > info->meetingstone.maxLevel)
return; return;
level = targetPlayer->getLevel(); level = targetPlayer->getLevel();
if (level < info->meetingstone.minLevel || level > info->meetingstone.maxLevel) if (level < info->meetingstone.minLevel || level > info->meetingstone.maxLevel)
return; return;
@ -1220,7 +1220,6 @@ void GameObject::Use(Unit* user)
break; break;
} }
case GAMEOBJECT_TYPE_FLAGSTAND: // 24 case GAMEOBJECT_TYPE_FLAGSTAND: // 24
{ {
if (user->GetTypeId() != TYPEID_PLAYER) if (user->GetTypeId() != TYPEID_PLAYER)

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "9200" #define REVISION_NR "9201"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__