Skip to content

Commit

Permalink
[10326] Process GAMEOBJECT_TYPE_FISHINGHOLE in normal way as for othe…
Browse files Browse the repository at this point in the history
…r GO's

Signed-off-by: NoFantasy <nofantasy@nf.no>
  • Loading branch information
NoFantasy committed Aug 6, 2010
1 parent 793f3ae commit 1bf6931
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
14 changes: 12 additions & 2 deletions src/game/GameObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1137,8 +1137,7 @@ void GameObject::Use(Unit* user)
GameObject* ok = LookupFishingHoleAround(20.0f + CONTACT_DISTANCE);
if (ok)
{
player->SendLoot(ok->GetGUID(),LOOT_FISHINGHOLE);
player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_FISH_IN_GAMEOBJECT, ok->GetGOInfo()->id);
ok->Use(player);
SetLootState(GO_JUST_DEACTIVATED);
}
else
Expand Down Expand Up @@ -1335,6 +1334,17 @@ void GameObject::Use(Unit* user)
}
break;
}
case GAMEOBJECT_TYPE_FISHINGHOLE: // 25
{
if (user->GetTypeId() != TYPEID_PLAYER)
return;

Player* player = (Player*)user;

player->SendLoot(GetGUID(), LOOT_FISHINGHOLE);
player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_FISH_IN_GAMEOBJECT, GetGOInfo()->id);
return;
}
case GAMEOBJECT_TYPE_FLAGDROP: // 26
{
if (user->GetTypeId() != TYPEID_PLAYER)
Expand Down
2 changes: 1 addition & 1 deletion src/game/GameObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ struct GameObjectInfo
uint32 openTextID; //6
uint32 losOK; //7
} flagstand;
//25 GAMEOBJECT_TYPE_FISHINGHOLE // not implemented yet
//25 GAMEOBJECT_TYPE_FISHINGHOLE
struct
{
uint32 radius; //0 how close bobber must land for sending loot
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 "10325"
#define REVISION_NR "10326"
#endif // __REVISION_NR_H__

0 comments on commit 1bf6931

Please sign in to comment.