Likes: 0
Results 1 to 1 of 1
Thread: [VIP][MOD] Quest VIP rates
-
15-02-16, 12:42 AM #1
[VIP][MOD] Quest VIP rates
Register to remove this adCREDITS : slp13at420
Rather than cluttering up the VIP release thread I will be instead releasing any external mods in there own threads like this.
This is an external mod dependent on my VIP Engine:
This requires you have installed my VIP Engine Found Here -> VIP Engine
then search you source for these files to edit:
/src/server/game/Entities/Creature/GossipDef.cpp
/src/server/game/Entities/Player/Player.cpp
Modify Quest Reward rates:
/src/server/game/Entities/Creature/GossipDef.cpp
first add:
Code:#include "Grumboz_VIP_Core.h"
find Function:
Code:void PlayerMenu::SendQuestGiverQuestDetails(Quest const* quest, ObjectGuid npcGUID, bool activateAccept) const
Code:float VIP_OFFSET = VIP::GetVIPOFFSET(); uint32 acctId = GetSession()->GetAccountId(); uint8 Pvip = VIP::GetVIP(acctId); float MOD = (Pvip * VIP_OFFSET); Player* player = GetSession()->GetPlayer(); float rate = (sWorld->getRate(RATE_XP_QUEST) + (sWorld->getRate(RATE_XP_QUEST) * MOD));
Code:data << uint32(quest->RewardChoiceItemCount[i]);
Code:uint32 Item_Choice_Reward_Count = quest->RewardItemIdCount[i]; uint32 extra_Item_Choice_Reward_Count = Item_Choice_Reward_Count * MOD; data << uint32(quest->RewardChoiceItemCount[i] + extra_Item_Choice_Reward_Count);
Code:data << uint32(quest->RewardItemIdCount[i]);
Code:uint32 Item_Reward_Count = quest->RewardItemIdCount[i]; uint32 extra_Item_Reward_Count = Item_Reward_Count * MOD; data << uint32(quest->RewardItemIdCount[i] + extra_Item_Reward_Count);
Code:data << uint32(quest->GetRewOrReqMoney() + quest->GetRewOrReqMoney()); data << uint32(quest->XPValue(_session->GetPlayer()) * sWorld->getRate(RATE_XP_QUEST));
Code:uint32 XP = quest->XPValue(player); float xp_rate = sWorld->getRate(RATE_XP_QUEST); uint32 MONEY = quest->GetRewOrReqMoney(); uint32 extra_XP = XP * xp_rate + (xp_rate * MOD); uint32 extra_MONEY = MONEY + (MONEY * MOD); data << uint32(MONEY + extra_MONEY); data << uint32(XP + extra_XP);
find Function:
Code:void PlayerMenu::SendQuestQueryResponse(Quest const* quest) const
Code:float VIP_OFFSET = VIP::GetVIPOFFSET(); uint32 acctId = GetSession()->GetAccountId(); uint8 Pvip = VIP::GetVIP(acctId); float MOD = (Pvip * VIP_OFFSET); Player* player = GetSession()->GetPlayer();
Code:if (quest->HasFlag(QUEST_FLAGS_HIDDEN_REWARDS)) data << uint32(0); // Hide money rewarded else data << uint32(quest->GetRewOrReqMoney()); // reward money (below max lvl)
Code:uint32 MONEY = quest->GetRewOrReqMoney(); uint32 extra_MONEY = MONEY * MOD; if (quest->HasFlag(QUEST_FLAGS_HIDDEN_REWARDS)) data << uint32(0); // Hide money rewarded else data << uint32(MONEY + extra_MONEY); // reward money (below max lvl)
Code:data << uint32(quest->RewardItemIdCount[i]);
Code:uint32 Item_Reward_Count = quest->RewardItemIdCount[i]; uint32 extra_Item_Reward_Count = Item_Reward_Count * MOD; data << uint32(quest->RewardItemIdCount[i] + extra_Item_Reward_Count);
Code:data << uint32(quest->RewardChoiceItemCount[i]);
Code:uint32 Item_Choice_Reward_Count = quest->RewardItemIdCount[i]; uint32 extra_Item_Choice_Reward_Count = Item_Choice_Reward_Count * MOD; data << uint32(quest->RewardChoiceItemCount[i] + extra_Item_Choice_Reward_Count);// data << uint32(quest->RewardChoiceItemCount[i]);
find function:
Code:void PlayerMenu::SendQuestGiverOfferReward(Quest const* quest, ObjectGuid npcGUID, bool enableNext) const
Code:float VIP_OFFSET = VIP::GetVIPOFFSET(); uint32 acctId = GetSession()->GetAccountId(); uint8 Pvip = VIP::GetVIP(acctId); float MOD = (Pvip * VIP_OFFSET); Player* player = GetSession()->GetPlayer();
Code:data << uint32(quest->RewardChoiceItemCount[i]);
Code:uint32 Item_Choice_Reward_Count = quest->RewardItemIdCount[i]; uint32 extra_Item_Choice_Reward_Count = Item_Choice_Reward_Count * MOD; data << uint32(quest->RewardChoiceItemCount[i] + extra_Item_Choice_Reward_Count);
Code:data << uint32(quest->RewardItemIdCount[i]);
Code:uint32 Item_Reward_Count = quest->RewardItemIdCount[i]; uint32 extra_Item_Reward_Count = Item_Reward_Count * MOD; data << uint32(quest->RewardItemIdCount[i] + extra_Item_Reward_Count);
Code:data << uint32(quest->GetRewOrReqMoney()); data << uint32(quest->XPValue(_session->GetPlayer()) * sWorld->getRate(RATE_XP_QUEST));
Code:uint32 XP = quest->XPValue(player); float xp_rate = sWorld->getRate(RATE_XP_QUEST); uint32 MONEY = quest->GetRewOrReqMoney(); uint32 extra_XP = XP * xp_rate + (xp_rate * MOD); uint32 extra_MONEY = MONEY + (MONEY * MOD); data << uint32(MONEY + extra_MONEY); data << uint32(XP + extra_XP);
/src/server/game/Entities/Player/Player.cpp
first add:
Code:#include "Grumboz_VIP_Core.h"
find function
Code:void Player::RewardQuest(Quest const* quest, uint32 reward, Object* questGiver, bool announce)
Code:float VIP_OFFSET = VIP::GetVIPOFFSET(); uint32 acctId = GetSession()->GetAccountId(); uint8 Pvip = VIP::GetVIP(acctId); float MOD = (Pvip * VIP_OFFSET); Player* player = GetSession()->GetPlayer();
Code:SendNewItem(item, quest->RewardItemIdCount[i], true, false);
Code:uint32 RewardItemCount = quest->RewardItemIdCount[i]; SendNewItem(item, RewardItemCount + (RewardItemCount * MOD), true, false);
Code:uint32 XP = rewarded && !quest->IsDFQuest() ? 0 : uint32(quest->XPValue(this)*sWorld->getRate(RATE_XP_QUEST));
Code:uint32 XP = rewarded && !quest->IsDFQuest() ? 0 : uint32(quest->XPValue(this)*sWorld->getRate(RATE_XP_QUEST)); XP = XP + (XP*MOD);
Code:moneyRew = int32(quest->GetRewMoneyMaxLevel());
Code:moneyRew = int32(quest->GetRewMoneyMaxLevel() + (quest->GetRewMoneyMaxLevel() * MOD));
Code:if (uint32 honor = quest->CalculateHonorGain(getLevel())) RewardHonor(NULL, 0, honor);
Code:if (uint32 honor = quest->CalculateHonorGain(getLevel())) { honor = honor + (honor * MOD); RewardHonor(NULL, 0, honor); }
Code:if (quest->GetRewArenaPoints()) ModifyArenaPoints(quest->GetRewArenaPoints());
Code:if (quest->GetRewArenaPoints()) { int32 ArenaPoints = quest->GetRewArenaPoints(); int32 RewardArenaPoints = ArenaPoints + (ArenaPoints * MOD); ModifyArenaPoints(RewardArenaPoints); }
find function:
Code:void Player::SendQuestReward(Quest const* quest, uint32 XP)
Code:float VIP_OFFSET = VIP::GetVIPOFFSET(); uint32 acctId = GetSession()->GetAccountId(); uint8 Pvip = VIP::GetVIP(acctId); float MOD = (Pvip * VIP_OFFSET); Player* player = GetSession()->GetPlayer();
Code:if (getLevel() < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) { data << uint32(XP); data << uint32(ModRewMoney); }
Code:int32 RewMoney = quest->GetRewOrReqMoney(); int32 ModRewMoney = RewMoney + (RewMoney * MOD); XP = XP + (XP * MOD); if (getLevel() < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) { data << uint32(XP); data << uint32(ModRewMoney); }
Code:data << uint32(quest->GetRewOrReqMoney() + int32(quest->GetRewMoneyMaxLevel() * sWorld->getRate(RATE_DROP_MONEY)));
Code:float DropMoneyRate = sWorld->getRate(RATE_DROP_MONEY); DropMoneyRate = DropMoneyRate + (DropMoneyRate * MOD); data << uint32(ModRewMoney + int32(quest->GetRewMoneyMaxLevel() * DropMoneyRate));
players will now see the modified values and receive the modified rewards
› See More: [VIP][MOD] Quest VIP rates