implement missing code
This commit is contained in:
@@ -35263,3 +35263,8 @@ int32 Player::GetQuestObjectiveProgress(uint32 questId, int8 storageIndex) const
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void Player::PlayConversation(uint32 conversationId)
|
||||
{
|
||||
Conversation::CreateConversation(conversationId, this, GetPosition(), { GetGUID() });
|
||||
}
|
||||
|
||||
@@ -53,6 +53,10 @@
|
||||
#include "WorldPacket.h"
|
||||
#include <unordered_map>
|
||||
|
||||
//WowCommunity
|
||||
#include "PhasingHandler.h"
|
||||
//WowCommunity
|
||||
//
|
||||
// Trait which indicates whether this script type
|
||||
// must be assigned in the database.
|
||||
template<typename>
|
||||
@@ -3283,6 +3287,45 @@ void ScriptMgr::OnQuestAbandon(Player* player, const Quest* quest)
|
||||
FOREACH_SCRIPT(PlayerScript)->OnQuestAbandon(player, quest);
|
||||
}
|
||||
|
||||
//WowCommunity
|
||||
|
||||
void WowCommunity::PhaseShift(Player* player, std::vector<uint32> phaseIDs, bool add)
|
||||
{
|
||||
for (uint32 phaseID : phaseIDs)
|
||||
{
|
||||
if (add)
|
||||
{
|
||||
if (!player->GetPhaseShift().HasPhase(phaseID))
|
||||
PhasingHandler::AddPhase(player, phaseID, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (player->GetPhaseShift().HasPhase(phaseID))
|
||||
PhasingHandler::RemovePhase(player, phaseID, true);
|
||||
}
|
||||
}
|
||||
|
||||
PhasingHandler::SendToPlayer(player);
|
||||
player->UpdateObjectVisibility(true);
|
||||
}
|
||||
|
||||
void ScriptMgr::OnPlayerWorldObjectUpdate(Player* player, uint32 diff)
|
||||
{
|
||||
FOREACH_SCRIPT(PlayerScript)->OnPlayerWorldObjectUpdate(player, diff);
|
||||
}
|
||||
|
||||
void ScriptMgr::OnSendNewItem(Player* player, Item* item)
|
||||
{
|
||||
FOREACH_SCRIPT(PlayerScript)->OnSendNewItem(player, item);
|
||||
}
|
||||
|
||||
void ScriptMgr::OnPlayerCriteriaUpdate(Player* player, Criteria const* criteria, CriteriaProgress const* progress)
|
||||
{
|
||||
FOREACH_SCRIPT(PlayerScript)->OnCriteriaUpdate(player, criteria, progress);
|
||||
}
|
||||
|
||||
//WowCommunity
|
||||
|
||||
// Specialize for each script type class like so:
|
||||
template class TC_GAME_API ScriptRegistry<SpellScriptLoader>;
|
||||
template class TC_GAME_API ScriptRegistry<ServerScript>;
|
||||
|
||||
@@ -1362,6 +1362,13 @@ class TC_GAME_API ScriptMgr
|
||||
|
||||
void OnEventTrigger(WorldObject* object, WorldObject* invoker, uint32 eventId);
|
||||
|
||||
// WowCommunity >
|
||||
public:
|
||||
void OnPlayerWorldObjectUpdate(Player* player, uint32 diff);
|
||||
void OnSendNewItem(Player* player, Item* item);
|
||||
void OnPlayerCriteriaUpdate(Player* player, Criteria const* criteria, CriteriaProgress const* progress);
|
||||
// WowCommunity
|
||||
|
||||
private:
|
||||
uint32 _scriptCount;
|
||||
bool _scriptIdUpdated;
|
||||
@@ -1521,20 +1528,9 @@ private:
|
||||
class TC_GAME_API WowCommunity
|
||||
{
|
||||
public:
|
||||
/// Player Functions >
|
||||
static void AddItemWithToast(Player* player, uint32 itemID, uint16 quantity, std::vector<int32> const& bonusIDs /*= std::vector<int32>()*/);
|
||||
static void SendABunchOfItemsInMail(Player* player, std::vector<uint32> BunchOfItems, std::string const& subject, std::vector<int32> const& bonusIDs /*= std::vector<int32>()*/);
|
||||
static bool StoreNewItemWithBonus(Player* player, uint32 item_id, uint32 item_count, std::vector<int32> const& bonusIDs /*= std::vector<int32>()*/);
|
||||
static void GearUpByLoadout(Player* player, uint32 loadout_purpose, std::vector<int32> const& bonusIDs /*= std::vector<int32>()*/);
|
||||
static bool CanTakeQuestFromSpell(Player* player, uint32 questGiverSpellId);
|
||||
static void AddCreditForQuestObjective(Player* player, uint32 questID, uint32 objectiveID);
|
||||
|
||||
static void PhaseShift(Player* player, std::vector<uint32> phaseIDs, bool add);
|
||||
|
||||
/// Creature Function >
|
||||
static void RemovePlayerFromTalkStorage(Player* player, std::map<int8 /*talks*/, std::vector<ObjectGuid>> talkStorage);
|
||||
static void UniqueTalkAndStore(int8 creatureTextGroupID, Creature* creature, Player* player, std::map<int8 /*talks*/, std::vector<ObjectGuid>> talkStorage, Milliseconds delay = 0s);
|
||||
|
||||
};
|
||||
//WowCommunity
|
||||
|
||||
|
||||
Reference in New Issue
Block a user