slp13at420
Mad Scientist
This is an external mod dependent on my VIP Engine.
This requires you have installed my VIP Engine Found Here -> VIP Engine
[Minimum required ver. 2.10]
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:
Armor Mod
src/server/game/entities/Unit/Statsystem.cpp
at top with #includes
line 249 inside void Player::UpdateArmor()
line 271 inside void Player::UpdateArmor()
replace SetArmor(uint32)value) with:
Health Mod
src/server/game/entities/Unit/Statsystem.cpp
at top with #includes
line 302
replace void Player::UpdateMaxHealth()
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
inside switch (statType)
use + (val * MOD) for increasing stats like
use - (val * MOD) for x taken ratings like
Talent Mod
src/server/game/entities/Player.cpp
inside void Player::InitTalentForLevel()
line 3144
line 3157 replace if (m_usedTalentCount > (talentPointsForLevel)
line 3171 replace SetFreeTalentPoints(talentPointsForLevel - m_usedTalentCount);
inside bool Player::resetTalents(bool no_cost)
line 4393
inside if (m_usedTalentCount == 0)
line 4410
line 4472 replace SetFreeTalentPoints(talentPointsForLevel);
Weapon Dmg Mod
/src/server/game/enteties/Player/
player.cpp
inside _ApplyWeaponDamage()
line 8117
line 8133 replace minDamage and maxDamage
-----------------------------------------------------
/src/server/game/enteties/Unit/StatSystem.cpp
void Player::CalculateMinMaxDamage line 534
line 556
This requires you have installed my VIP Engine Found Here -> VIP Engine
[Minimum required ver. 2.10]
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:
Code:
[COLOR="#808080"]
#include "Grumboz_VIP_Core.h"
[/COLOR]
Armor Mod
src/server/game/entities/Unit/Statsystem.cpp
at top with #includes
Code:
[COLOR="#808080"]
#include "Grumboz_VIP_Core.h"
[/COLOR]
line 249 inside void Player::UpdateArmor()
Code:
[COLOR="#808080"]
float VIP_OFFSET = sVIP->GetVIPOFFSET();
uint32 acctId = GetSession()->GetAccountId();
uint8 Pvip = sVIP->GetPlayerVIP(acctId);
float MOD = (Pvip * VIP_OFFSET);
[/COLOR]
line 271 inside void Player::UpdateArmor()
replace SetArmor(uint32)value) with:
Code:
[COLOR="#808080"]
uint32 THP = (uint32)value * MOD;
int32 HPMOD = (int32)value + THP;
SetArmor(HPMOD);
[/COLOR]
Health Mod
src/server/game/entities/Unit/Statsystem.cpp
at top with #includes
Code:
[COLOR="#808080"]
#include "Grumboz_VIP_Core.h"
#include "WorldSession.h"
[/COLOR]
line 302
replace void Player::UpdateMaxHealth()
Code:
[COLOR="#808080"]
void Player::UpdateMaxHealth()
{
float VIP_OFFSET = sVIP->GetVIPOFFSET();
uint32 acctId = GetSession()->GetAccountId();
uint8 Pvip = sVIP->GetPlayerVIP(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));
}
[/COLOR]
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
Code:
[COLOR="#808080"]
float VIP_OFFSET = sVIP->GetVIPOFFSET();
uint32 acctId = GetSession()->GetAccountId();
uint8 Pvip = sVIP->GetPlayerVIP(acctId);
float MOD = (Pvip * VIP_OFFSET);
[/COLOR]
inside switch (statType)
use + (val * MOD) for increasing stats like
Code:
[COLOR="#808080"]
case ITEM_MOD_MANA:
HandleStatModifier(UNIT_MOD_MANA, BASE_VALUE, float(val + (val * MOD)), apply);
break;
[/COLOR]
use - (val * MOD) for x taken ratings like
Code:
[COLOR="#808080"]
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;
[/COLOR]
Talent Mod
src/server/game/entities/Player.cpp
inside void Player::InitTalentForLevel()
line 3144
Code:
[COLOR="#808080"]
uint32 acct_id = GetSession()->GetAccountId();
uint8 Pvip = sVIP->GetPlayerVIP(acct_id);
uint8 VIP_TP_BONUS = sVIP->GetTALENTBONUS();
uint8 TPMOD = (Pvip * VIP_TP_BONUS);
[/COLOR]
line 3157 replace if (m_usedTalentCount > (talentPointsForLevel)
Code:
[COLOR="#808080"]
if (m_usedTalentCount > (talentPointsForLevel + TPMOD))
[/COLOR]
line 3171 replace SetFreeTalentPoints(talentPointsForLevel - m_usedTalentCount);
Code:
[COLOR="#808080"]
SetFreeTalentPoints((talentPointsForLevel + TPMOD) - m_usedTalentCount);
[/COLOR]
inside bool Player::resetTalents(bool no_cost)
line 4393
Code:
[COLOR="#808080"]
uint32 acct_id = GetSession()->GetAccountId();
uint8 Pvip = sVIP->GetPlayerVIP(acct_id);
uint8 VIP_TP_BONUS = sVIP->GetTALENTBONUS();
uint8 TPMOD = (Pvip * VIP_TP_BONUS);
[/COLOR]
inside if (m_usedTalentCount == 0)
line 4410
Code:
[COLOR="#808080"]
SetFreeTalentPoints(talentPointsForLevel + TPMOD);
[/COLOR]
line 4472 replace SetFreeTalentPoints(talentPointsForLevel);
Code:
[COLOR="#808080"]
SetFreeTalentPoints(talentPointsForLevel + TPMOD);
[/COLOR]
Weapon Dmg Mod
/src/server/game/enteties/Player/
player.cpp
inside _ApplyWeaponDamage()
line 8117
Code:
[COLOR="#808080"]
float VIP_OFFSET = sVIP->GetVIPOFFSET();
uint32 acctId = GetSession()->GetAccountId();
uint8 Pvip = sVIP->GetPlayerVIP(acctId);
float MOD = (Pvip * VIP_OFFSET);
[/COLOR]
Code:
[COLOR="#808080"]
float minDamage = proto->Damage[0].DamageMin + (proto->Damage[0].DamageMin / MOD);
float maxDamage = proto->Damage[0].DamageMax + (proto->Damage[0].DamageMax / MOD);
[/COLOR]
-----------------------------------------------------
/src/server/game/enteties/Unit/StatSystem.cpp
void Player::CalculateMinMaxDamage line 534
Code:
[COLOR="#808080"]
float VIP_OFFSET = sVIP->GetVIPOFFSET();
uint32 acctId = GetSession()->GetAccountId();
uint8 Pvip = sVIP->GetPlayerVIP(acctId);
float MOD = (Pvip * VIP_OFFSET);
[/COLOR]
line 556
Code:
[COLOR="#808080"]
float weaponMinDamage = GetWeaponDamageRange(attType, MINDAMAGE) + (GetWeaponDamageRange(attType, MINDAMAGE) / MOD);
float weaponMaxDamage = GetWeaponDamageRange(attType, MAXDAMAGE) + (GetWeaponDamageRange(attType, MAXDAMAGE) / MOD);
[/COLOR]
Last edited: