Wise
15-02-16, 12:46 AM
Credits : slp13at420
This is an external mod dependent on my VIP Engine:
This requires you have installed my VIP Engine Found Here -> VIP Engine (http://www.mmopro.org/forums/c-scripts-and-patches/21038-grumboz-vip-system.html)
search your source for these files to edit:
src/server/game/entities/Unit/Statsystem.cpp
src/server/game/enteties/Player/Player.cpp
add if not already added at top with #includes:
#include "Grumboz_VIP_Core.h"
Armor Mod
src/server/game/entities/Unit/Statsystem.cpp
at top with #includes
#include "Grumboz_VIP_Core.h"
line 249 inside void Player::UpdateArmor()
float VIP_OFFSET = VIP::GetVIPOFFSET();
uint32 acctId = GetSession()->GetAccountId();
uint8 Pvip = VIP::GetVIP(acctId);
float MOD = (Pvip * VIP_OFFSET);
line 271 inside void Player::UpdateArmor()
replace SetArmor(uint32)value) with:
uint32 THP = (uint32)value * MOD;
int32 HPMOD = (int32)value + THP;
SetArmor(HPMOD);
Health Mod
src/server/game/entities/Unit/Statsystem.cpp
at top with #includes
#include "Grumboz_VIP_Core.h"
#include "WorldSession.h"
line 302
replace void Player::UpdateMaxHealth()
void Player::UpdateMaxHealth()
{
float VIP_OFFSET = VIP::GetVIPOFFSET();
uint32 acctId = GetSession()->GetAccountId();
uint8 Pvip = VIP::GetVIP(acctId);
float MOD = (Pvip * VIP_OFFSET);
UnitMods unitMod = UNIT_MOD_HEALTH;
float value = GetModifierValue(unitMod, BASE_VALUE) + GetCreateHealth();
value *= GetModifierValue(unitMod, BASE_PCT);
value += GetModifierValue(unitMod, TOTAL_VALUE) + GetHealthBonusFromStamina();
value *= GetModifierValue(unitMod, TOTAL_PCT);
float THP = (uint32)value * MOD;
float HPMOD = (uint32)value + THP;
SetMaxHealth(uint32(HPMOD));
}
Item Stat Mod
src/server/game/enteties/Player/Player.cpp
inside void Player::_ApplyItemBonuses(ItemTemplate const* proto, uint8 slot, bool apply, bool only_level_scale /*= false*/)
line 7820
float VIP_OFFSET = VIP::GetVIPOFFSET();
uint32 acctId = GetSession()->GetAccountId();
uint8 Pvip = VIP::GetVIP(acctId);
float MOD = (Pvip * VIP_OFFSET);
inside switch (statType)
use + (val * MOD) for increasing stats like
case ITEM_MOD_MANA:
HandleStatModifier(UNIT_MOD_MANA, BASE_VALUE, float(val + (val * MOD)), apply);
break;
use - (val * MOD) for x taken ratings like
case ITEM_MOD_HIT_TAKEN_RATING:
ApplyRatingMod(CR_HIT_TAKEN_MELEE, int32(val - (val * MOD)), apply);
ApplyRatingMod(CR_HIT_TAKEN_RANGED, int32(val - (val * MOD)), apply);
ApplyRatingMod(CR_HIT_TAKEN_SPELL, int32(val - (val * MOD)), apply);
break;
Talent Mod
src/server/game/entities/Player.cpp
inside void Player::InitTalentForLevel()
line 3144
uint32 acct_id = GetSession()->GetAccountId();
uint8 Pvip = VIP::GetVIP(acct_id);
uint8 VIP_TP_BONUS = VIP::GetTALENTBONUS();
uint8 TPMOD = (Pvip * VIP_TP_BONUS);
line 3157 replace if (m_usedTalentCount > (talentPointsForLevel)
if (m_usedTalentCount > (talentPointsForLevel + TPMOD))
line 3171 replace SetFreeTalentPoints(talentPointsForLevel - m_usedTalentCount);
SetFreeTalentPoints((talentPointsForLevel + TPMOD) - m_usedTalentCount);
inside bool Player::resetTalents(bool no_cost)
line 4393
uint32 acct_id = GetSession()->GetAccountId();
uint8 Pvip = VIP::GetVIP(acct_id);
uint8 VIP_TP_BONUS = VIP::GetTALENTBONUS();
uint8 TPMOD = (Pvip * VIP_TP_BONUS);
inside if (m_usedTalentCount == 0)
line 4410
SetFreeTalentPoints(talentPointsForLevel + TPMOD);
line 4472 replace SetFreeTalentPoints(talentPointsForLevel);
SetFreeTalentPoints(talentPointsForLevel + TPMOD);
Weapon Dmg Mod
/src/server/game/enteties/Player/
player.cpp
inside _ApplyWeaponDamage()
line 8117
float VIP_OFFSET = VIP::GetVIPOFFSET();
uint32 acctId = GetSession()->GetAccountId();
uint8 Pvip = VIP::GetVIP(acctId);
float MOD = (Pvip * VIP_OFFSET);
line 8133 replace minDamage and maxDamage
float minDamage = proto->Damage[0].DamageMin + (proto->Damage[0].DamageMin / MOD);
float maxDamage = proto->Damage[0].DamageMax + (proto->Damage[0].DamageMax / MOD);
-----------------------------------------------------
/src/server/game/enteties/Unit/StatSystem.cpp
void Player::CalculateMinMaxDamage line 534
float VIP_OFFSET = VIP::GetVIPOFFSET();
uint32 acctId = GetSession()->GetAccountId();
uint8 Pvip = VIP::GetVIP(acctId);
float MOD = (Pvip * VIP_OFFSET);
line 556
float weaponMinDamage = GetWeaponDamageRange(attType, MINDAMAGE) + (GetWeaponDamageRange(attType, MINDAMAGE) / MOD);
float weaponMaxDamage = GetWeaponDamageRange(attType, MAXDAMAGE) + (GetWeaponDamageRange(attType, MAXDAMAGE) / MOD);
The Diff (https://github.com/BlackWolfsDen/DIFFS/blob/master/VIP/Player_Stats_MOD.diff)
This is an external mod dependent on my VIP Engine:
This requires you have installed my VIP Engine Found Here -> VIP Engine (http://www.mmopro.org/forums/c-scripts-and-patches/21038-grumboz-vip-system.html)
search your source for these files to edit:
src/server/game/entities/Unit/Statsystem.cpp
src/server/game/enteties/Player/Player.cpp
add if not already added at top with #includes:
#include "Grumboz_VIP_Core.h"
Armor Mod
src/server/game/entities/Unit/Statsystem.cpp
at top with #includes
#include "Grumboz_VIP_Core.h"
line 249 inside void Player::UpdateArmor()
float VIP_OFFSET = VIP::GetVIPOFFSET();
uint32 acctId = GetSession()->GetAccountId();
uint8 Pvip = VIP::GetVIP(acctId);
float MOD = (Pvip * VIP_OFFSET);
line 271 inside void Player::UpdateArmor()
replace SetArmor(uint32)value) with:
uint32 THP = (uint32)value * MOD;
int32 HPMOD = (int32)value + THP;
SetArmor(HPMOD);
Health Mod
src/server/game/entities/Unit/Statsystem.cpp
at top with #includes
#include "Grumboz_VIP_Core.h"
#include "WorldSession.h"
line 302
replace void Player::UpdateMaxHealth()
void Player::UpdateMaxHealth()
{
float VIP_OFFSET = VIP::GetVIPOFFSET();
uint32 acctId = GetSession()->GetAccountId();
uint8 Pvip = VIP::GetVIP(acctId);
float MOD = (Pvip * VIP_OFFSET);
UnitMods unitMod = UNIT_MOD_HEALTH;
float value = GetModifierValue(unitMod, BASE_VALUE) + GetCreateHealth();
value *= GetModifierValue(unitMod, BASE_PCT);
value += GetModifierValue(unitMod, TOTAL_VALUE) + GetHealthBonusFromStamina();
value *= GetModifierValue(unitMod, TOTAL_PCT);
float THP = (uint32)value * MOD;
float HPMOD = (uint32)value + THP;
SetMaxHealth(uint32(HPMOD));
}
Item Stat Mod
src/server/game/enteties/Player/Player.cpp
inside void Player::_ApplyItemBonuses(ItemTemplate const* proto, uint8 slot, bool apply, bool only_level_scale /*= false*/)
line 7820
float VIP_OFFSET = VIP::GetVIPOFFSET();
uint32 acctId = GetSession()->GetAccountId();
uint8 Pvip = VIP::GetVIP(acctId);
float MOD = (Pvip * VIP_OFFSET);
inside switch (statType)
use + (val * MOD) for increasing stats like
case ITEM_MOD_MANA:
HandleStatModifier(UNIT_MOD_MANA, BASE_VALUE, float(val + (val * MOD)), apply);
break;
use - (val * MOD) for x taken ratings like
case ITEM_MOD_HIT_TAKEN_RATING:
ApplyRatingMod(CR_HIT_TAKEN_MELEE, int32(val - (val * MOD)), apply);
ApplyRatingMod(CR_HIT_TAKEN_RANGED, int32(val - (val * MOD)), apply);
ApplyRatingMod(CR_HIT_TAKEN_SPELL, int32(val - (val * MOD)), apply);
break;
Talent Mod
src/server/game/entities/Player.cpp
inside void Player::InitTalentForLevel()
line 3144
uint32 acct_id = GetSession()->GetAccountId();
uint8 Pvip = VIP::GetVIP(acct_id);
uint8 VIP_TP_BONUS = VIP::GetTALENTBONUS();
uint8 TPMOD = (Pvip * VIP_TP_BONUS);
line 3157 replace if (m_usedTalentCount > (talentPointsForLevel)
if (m_usedTalentCount > (talentPointsForLevel + TPMOD))
line 3171 replace SetFreeTalentPoints(talentPointsForLevel - m_usedTalentCount);
SetFreeTalentPoints((talentPointsForLevel + TPMOD) - m_usedTalentCount);
inside bool Player::resetTalents(bool no_cost)
line 4393
uint32 acct_id = GetSession()->GetAccountId();
uint8 Pvip = VIP::GetVIP(acct_id);
uint8 VIP_TP_BONUS = VIP::GetTALENTBONUS();
uint8 TPMOD = (Pvip * VIP_TP_BONUS);
inside if (m_usedTalentCount == 0)
line 4410
SetFreeTalentPoints(talentPointsForLevel + TPMOD);
line 4472 replace SetFreeTalentPoints(talentPointsForLevel);
SetFreeTalentPoints(talentPointsForLevel + TPMOD);
Weapon Dmg Mod
/src/server/game/enteties/Player/
player.cpp
inside _ApplyWeaponDamage()
line 8117
float VIP_OFFSET = VIP::GetVIPOFFSET();
uint32 acctId = GetSession()->GetAccountId();
uint8 Pvip = VIP::GetVIP(acctId);
float MOD = (Pvip * VIP_OFFSET);
line 8133 replace minDamage and maxDamage
float minDamage = proto->Damage[0].DamageMin + (proto->Damage[0].DamageMin / MOD);
float maxDamage = proto->Damage[0].DamageMax + (proto->Damage[0].DamageMax / MOD);
-----------------------------------------------------
/src/server/game/enteties/Unit/StatSystem.cpp
void Player::CalculateMinMaxDamage line 534
float VIP_OFFSET = VIP::GetVIPOFFSET();
uint32 acctId = GetSession()->GetAccountId();
uint8 Pvip = VIP::GetVIP(acctId);
float MOD = (Pvip * VIP_OFFSET);
line 556
float weaponMinDamage = GetWeaponDamageRange(attType, MINDAMAGE) + (GetWeaponDamageRange(attType, MINDAMAGE) / MOD);
float weaponMaxDamage = GetWeaponDamageRange(attType, MAXDAMAGE) + (GetWeaponDamageRange(attType, MAXDAMAGE) / MOD);
The Diff (https://github.com/BlackWolfsDen/DIFFS/blob/master/VIP/Player_Stats_MOD.diff)