mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Scripts: Remove deprecated overload of QuestReward without LootItemType argument
This commit is contained in:
@@ -18,7 +18,6 @@
|
||||
#include "GameObjectAI.h"
|
||||
#include "CreatureAI.h"
|
||||
#include "GameObject.h"
|
||||
#include "LootMgr.h"
|
||||
#include "QuestDef.h"
|
||||
|
||||
int32 GameObjectAI::Permissible(GameObject const* /*go*/)
|
||||
@@ -26,11 +25,6 @@ int32 GameObjectAI::Permissible(GameObject const* /*go*/)
|
||||
return PERMIT_BASE_NO;
|
||||
}
|
||||
|
||||
void GameObjectAI::QuestReward(Player* player, Quest const* quest, uint32 opt)
|
||||
{
|
||||
QuestReward(player, quest, LootItemType::Item, opt);
|
||||
}
|
||||
|
||||
Optional<QuestGiverStatus> GameObjectAI::GetDialogStatus(Player* /*player*/)
|
||||
{
|
||||
return {};
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#define TRINITY_GAMEOBJECTAI_H
|
||||
|
||||
#include "Define.h"
|
||||
#include "LootItemType.h"
|
||||
#include "ObjectGuid.h"
|
||||
#include "Optional.h"
|
||||
|
||||
@@ -27,7 +28,6 @@ class Player;
|
||||
class Quest;
|
||||
class SpellInfo;
|
||||
class Unit;
|
||||
enum class LootItemType : uint8;
|
||||
enum class QuestGiverStatus : uint32;
|
||||
|
||||
class TC_GAME_API GameObjectAI
|
||||
@@ -67,7 +67,6 @@ class TC_GAME_API GameObjectAI
|
||||
virtual void QuestAccept(Player* /*player*/, Quest const* /*quest*/) { }
|
||||
|
||||
// Called when a player completes a quest and is rewarded, opt is the selected item's index or 0
|
||||
virtual void QuestReward(Player* player, Quest const* quest, uint32 opt);
|
||||
virtual void QuestReward(Player* /*player*/, Quest const* /*quest*/, LootItemType /*type*/, uint32 /*opt*/) { }
|
||||
|
||||
// Called when a Player clicks a GameObject, before GossipHello
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include "CreatureTextMgr.h"
|
||||
#include "Language.h"
|
||||
#include "Log.h"
|
||||
#include "LootMgr.h"
|
||||
#include "Map.h"
|
||||
#include "MapReference.h"
|
||||
#include "MotionMaster.h"
|
||||
@@ -276,11 +275,6 @@ Optional<QuestGiverStatus> CreatureAI::GetDialogStatus(Player* /*player*/)
|
||||
return {};
|
||||
}
|
||||
|
||||
void CreatureAI::QuestReward(Player* player, Quest const* quest, uint32 opt)
|
||||
{
|
||||
QuestReward(player, quest, LootItemType::Item, opt);
|
||||
}
|
||||
|
||||
const uint32 BOUNDARY_VISUALIZE_CREATURE = 15425;
|
||||
const float BOUNDARY_VISUALIZE_CREATURE_SCALE = 0.25f;
|
||||
const int8 BOUNDARY_VISUALIZE_STEP_SIZE = 1;
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "UnitAI.h"
|
||||
#include "Common.h"
|
||||
#include "LootItemType.h"
|
||||
#include "ObjectDefines.h"
|
||||
#include "Optional.h"
|
||||
#include "QuestDef.h"
|
||||
@@ -32,7 +33,6 @@ class GameObject;
|
||||
class PlayerAI;
|
||||
class WorldObject;
|
||||
struct Position;
|
||||
enum class LootItemType : uint8;
|
||||
enum class QuestGiverStatus : uint32;
|
||||
|
||||
typedef std::vector<AreaBoundary const*> CreatureBoundary;
|
||||
@@ -190,7 +190,6 @@ class TC_GAME_API CreatureAI : public UnitAI
|
||||
virtual void QuestAccept(Player* /*player*/, Quest const* /*quest*/) { }
|
||||
|
||||
// Called when a player completes a quest and is rewarded, opt is the selected item's index or 0
|
||||
virtual void QuestReward(Player* player, Quest const* quest, uint32 opt);
|
||||
virtual void QuestReward(Player* /*player*/, Quest const* /*quest*/, LootItemType /*type*/, uint32 /*opt*/) { }
|
||||
|
||||
/// == Waypoints system =============================
|
||||
|
||||
@@ -768,7 +768,7 @@ void SmartAI::QuestAccept(Player* player, Quest const* quest)
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_ACCEPTED_QUEST, player, quest->GetQuestId());
|
||||
}
|
||||
|
||||
void SmartAI::QuestReward(Player* player, Quest const* quest, uint32 opt)
|
||||
void SmartAI::QuestReward(Player* player, Quest const* quest, LootItemType /*type*/, uint32 opt)
|
||||
{
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_REWARD_QUEST, player, quest->GetQuestId(), opt);
|
||||
}
|
||||
@@ -1035,7 +1035,7 @@ void SmartGameObjectAI::QuestAccept(Player* player, Quest const* quest)
|
||||
}
|
||||
|
||||
// Called when a player selects a quest reward.
|
||||
void SmartGameObjectAI::QuestReward(Player* player, Quest const* quest, uint32 opt)
|
||||
void SmartGameObjectAI::QuestReward(Player* player, Quest const* quest, LootItemType /*type*/, uint32 opt)
|
||||
{
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_REWARD_QUEST, player, quest->GetQuestId(), opt, false, nullptr, me);
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ class TC_GAME_API SmartAI : public CreatureAI
|
||||
bool GossipSelect(Player* player, uint32 menuId, uint32 gossipListId) override;
|
||||
bool GossipSelectCode(Player* player, uint32 menuId, uint32 gossipListId, char const* code) override;
|
||||
void QuestAccept(Player* player, Quest const* quest) override;
|
||||
void QuestReward(Player* player, Quest const* quest, uint32 opt) override;
|
||||
void QuestReward(Player* player, Quest const* quest, LootItemType type, uint32 opt) override;
|
||||
void OnGameEvent(bool start, uint16 eventId) override;
|
||||
|
||||
void SetDespawnTime (uint32 t, uint32 r = 0)
|
||||
@@ -269,7 +269,7 @@ class TC_GAME_API SmartGameObjectAI : public GameObjectAI
|
||||
bool GossipSelect(Player* player, uint32 menuId, uint32 gossipListId) override;
|
||||
bool GossipSelectCode(Player* player, uint32 menuId, uint32 gossipListId, char const* code) override;
|
||||
void QuestAccept(Player* player, Quest const* quest) override;
|
||||
void QuestReward(Player* player, Quest const* quest, uint32 opt) override;
|
||||
void QuestReward(Player* player, Quest const* quest, LootItemType type, uint32 opt) override;
|
||||
void Destroyed(Player* player, uint32 eventId) override;
|
||||
void SetData(uint32 id, uint32 value) override;
|
||||
void SetScript9(SmartScriptHolder& e, uint32 entry, Unit* invoker);
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#include "LFGQueue.h"
|
||||
#include "LFGScripts.h"
|
||||
#include "Log.h"
|
||||
#include "LootMgr.h"
|
||||
#include "Map.h"
|
||||
#include "MotionMaster.h"
|
||||
#include "ObjectAccessor.h"
|
||||
|
||||
@@ -94,7 +94,6 @@ enum GroupCategory : uint8;
|
||||
enum InventoryType : uint8;
|
||||
enum ItemClass : uint8;
|
||||
enum LootError : uint8;
|
||||
enum class LootItemType : uint8;
|
||||
enum LootType : uint8;
|
||||
enum PlayerRestState : uint8;
|
||||
enum RestTypes : uint8;
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#include "GossipDef.h"
|
||||
#include "Group.h"
|
||||
#include "Log.h"
|
||||
#include "LootMgr.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Player.h"
|
||||
|
||||
29
src/server/game/Loot/LootItemType.h
Normal file
29
src/server/game/Loot/LootItemType.h
Normal file
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LootItemType_h__
|
||||
#define LootItemType_h__
|
||||
|
||||
#include "Define.h"
|
||||
|
||||
enum class LootItemType : uint8
|
||||
{
|
||||
Item = 0,
|
||||
Currency = 1
|
||||
};
|
||||
|
||||
#endif // LootItemType_h__
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "Define.h"
|
||||
#include "ConditionMgr.h"
|
||||
#include "LootItemType.h"
|
||||
#include "ObjectGuid.h"
|
||||
#include "SharedDefines.h"
|
||||
#include <list>
|
||||
@@ -33,12 +34,6 @@ class Player;
|
||||
struct Loot;
|
||||
struct LootItem;
|
||||
|
||||
enum class LootItemType : uint8
|
||||
{
|
||||
Item = 0,
|
||||
Currency = 1
|
||||
};
|
||||
|
||||
struct TC_GAME_API LootStoreItem
|
||||
{
|
||||
uint32 itemid; // id of the item
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "Common.h"
|
||||
#include "DBCEnums.h"
|
||||
#include "DatabaseEnvFwd.h"
|
||||
#include "LootItemType.h"
|
||||
#include "Optional.h"
|
||||
#include "RaceMask.h"
|
||||
#include "SharedDefines.h"
|
||||
@@ -29,7 +30,6 @@
|
||||
#include <vector>
|
||||
|
||||
class Player;
|
||||
enum class LootItemType : uint8;
|
||||
|
||||
namespace WorldPackets
|
||||
{
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#include "Scenario.h"
|
||||
#include "InstanceSaveMgr.h"
|
||||
#include "Log.h"
|
||||
#include "LootMgr.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Player.h"
|
||||
|
||||
@@ -20,13 +20,12 @@
|
||||
|
||||
#include "Packet.h"
|
||||
#include "ItemPacketsCommon.h"
|
||||
#include "LootItemType.h"
|
||||
#include "NPCPackets.h"
|
||||
#include "ObjectGuid.h"
|
||||
#include "QuestDef.h"
|
||||
#include <array>
|
||||
|
||||
enum class LootItemType : uint8;
|
||||
|
||||
namespace WorldPackets
|
||||
{
|
||||
namespace Quest
|
||||
@@ -238,7 +237,7 @@ namespace WorldPackets
|
||||
|
||||
struct QuestChoiceItem
|
||||
{
|
||||
::LootItemType LootItemType = ::LootItemType(0);
|
||||
::LootItemType LootItemType = ::LootItemType::Item;
|
||||
Item::ItemInstance Item;
|
||||
int32 Quantity = 0;
|
||||
};
|
||||
|
||||
@@ -26,7 +26,6 @@ EndScriptData */
|
||||
#include "Chat.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "LootMgr.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Player.h"
|
||||
#include "RBAC.h"
|
||||
|
||||
@@ -600,7 +600,7 @@ public:
|
||||
EscortAI::UpdateAI(diff);
|
||||
}
|
||||
|
||||
void QuestReward(Player* /*player*/, Quest const* quest, uint32 /*item*/) override
|
||||
void QuestReward(Player* /*player*/, Quest const* quest, LootItemType /*type*/, uint32 /*item*/) override
|
||||
{
|
||||
if (instance->GetData(TYPE_BAR) == DONE || instance->GetData(TYPE_BAR) == SPECIAL)
|
||||
return;
|
||||
|
||||
@@ -890,7 +890,7 @@ class go_loosely_turned_soil : public GameObjectScript
|
||||
return false;
|
||||
}
|
||||
|
||||
void QuestReward(Player* player, Quest const* /*quest*/, uint32 /*opt*/) override
|
||||
void QuestReward(Player* player, Quest const* /*quest*/, LootItemType /*type*/, uint32 /*opt*/) override
|
||||
{
|
||||
if (instance->GetBossState(DATA_HORSEMAN_EVENT) == IN_PROGRESS)
|
||||
return;
|
||||
|
||||
@@ -266,7 +266,7 @@ class boss_apothecary_hummel : public CreatureScript
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void QuestReward(Player* /*player*/, Quest const* quest, uint32 /*opt*/) override
|
||||
void QuestReward(Player* /*player*/, Quest const* quest, LootItemType /*type*/, uint32 /*opt*/) override
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_YOUVE_BEEN_SERVED)
|
||||
DoAction(ACTION_START_EVENT);
|
||||
|
||||
@@ -236,7 +236,7 @@ public:
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void QuestReward(Player* player, Quest const* quest, uint32 /*opt*/) override
|
||||
void QuestReward(Player* player, Quest const* quest, LootItemType /*type*/, uint32 /*opt*/) override
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_JOURNEY_TO_UNDERCITY)
|
||||
SetGUID(player->GetGUID(), GUID_EVENT_INVOKER);
|
||||
|
||||
@@ -676,7 +676,7 @@ class npc_the_etymidian : public CreatureScript
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void QuestReward(Player* /*player*/, Quest const* quest, uint32 /*opt*/) override
|
||||
void QuestReward(Player* /*player*/, Quest const* quest, LootItemType /*type*/, uint32 /*opt*/) override
|
||||
{
|
||||
if (quest->GetQuestId() != QUEST_THE_ACTIVATION_RUNE)
|
||||
return;
|
||||
|
||||
@@ -336,7 +336,7 @@ public:
|
||||
Reset();
|
||||
}
|
||||
|
||||
void QuestReward(Player* /*player*/, Quest const* quest, uint32 /*opt*/) override
|
||||
void QuestReward(Player* /*player*/, Quest const* quest, LootItemType /*type*/, uint32 /*opt*/) override
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_CLUCK)
|
||||
Reset();
|
||||
|
||||
Reference in New Issue
Block a user