mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 10:31:29 +00:00
int16/32 mismatch fixes. see changelog.txt
This commit is contained in:
parent
beff1caf4f
commit
29d614421f
@ -3,7 +3,8 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
||||
== 11/03/2014 ==
|
||||
Secrets: Fixed an overflow in melee lifetap calculations (int16 vs int32)
|
||||
Secrets: Fixed overflow on AC and ATK values that can go out of range.
|
||||
Secrets: Merc/Bot fixes.
|
||||
Secrets: Merc/Bot fixes for previous updates.
|
||||
Secrets: Changed a lot of int16s for stat-related functions to int32 because they were causing combat formula overflows (int16/int32 mismatch).
|
||||
|
||||
== 11/02/2014 ==
|
||||
Akkadius: Added out of range checking for Spell Save/Loads
|
||||
|
||||
@ -1316,7 +1316,7 @@ bool Client::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, b
|
||||
if (Hand == MainSecondary) {// Do we even have it & was attack with mainhand? If not, don't bother with other calculations
|
||||
//Live AA - SlipperyAttacks
|
||||
//This spell effect most likely directly modifies the actual riposte chance when using offhand attack.
|
||||
int16 OffhandRiposteFail = aabonuses.OffhandRiposteFail + itembonuses.OffhandRiposteFail + spellbonuses.OffhandRiposteFail;
|
||||
int32 OffhandRiposteFail = aabonuses.OffhandRiposteFail + itembonuses.OffhandRiposteFail + spellbonuses.OffhandRiposteFail;
|
||||
OffhandRiposteFail *= -1; //Live uses a negative value for this.
|
||||
|
||||
if (OffhandRiposteFail &&
|
||||
@ -1334,7 +1334,7 @@ bool Client::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, b
|
||||
}
|
||||
|
||||
if (((damage < 0) || slippery_attack) && !bRiposte && !IsStrikethrough) { // Hack to still allow Strikethrough chance w/ Slippery Attacks AA
|
||||
int16 bonusStrikeThrough = itembonuses.StrikeThrough + spellbonuses.StrikeThrough + aabonuses.StrikeThrough;
|
||||
int32 bonusStrikeThrough = itembonuses.StrikeThrough + spellbonuses.StrikeThrough + aabonuses.StrikeThrough;
|
||||
|
||||
if(bonusStrikeThrough && (MakeRandomInt(0, 100) < bonusStrikeThrough)) {
|
||||
Message_StringID(MT_StrikeThrough, STRIKETHROUGH_STRING); // You strike through your opponents defenses!
|
||||
@ -1821,7 +1821,7 @@ bool NPC::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, bool
|
||||
//ele and bane dmg too
|
||||
//NPCs add this differently than PCs
|
||||
//if NPCs can't inheriently hit the target we don't add bane/magic dmg which isn't exactly the same as PCs
|
||||
uint16 eleBane = 0;
|
||||
uint32 eleBane = 0;
|
||||
if(weapon){
|
||||
if(weapon->BaneDmgBody == other->GetBodyType()){
|
||||
eleBane += weapon->BaneDmgAmt;
|
||||
@ -2413,7 +2413,7 @@ void Mob::AddToHateList(Mob* other, int32 hate, int32 damage, bool iYellForHelp,
|
||||
AddRampage(other);
|
||||
int hatemod = 100 + other->spellbonuses.hatemod + other->itembonuses.hatemod + other->aabonuses.hatemod;
|
||||
|
||||
int16 shieldhatemod = other->spellbonuses.ShieldEquipHateMod + other->itembonuses.ShieldEquipHateMod + other->aabonuses.ShieldEquipHateMod;
|
||||
int32 shieldhatemod = other->spellbonuses.ShieldEquipHateMod + other->itembonuses.ShieldEquipHateMod + other->aabonuses.ShieldEquipHateMod;
|
||||
|
||||
if (shieldhatemod && other->HasShieldEquiped())
|
||||
hatemod += shieldhatemod;
|
||||
@ -2589,7 +2589,7 @@ void Mob::DamageShield(Mob* attacker, bool spell_ds) {
|
||||
//Spell data for damage shield mitigation shows a negative value for spells for clients and positive
|
||||
//value for spells that effect pets. Unclear as to why. For now will convert all positive to be consistent.
|
||||
if (attacker->IsOffHandAtk()){
|
||||
int16 mitigation = attacker->itembonuses.DSMitigationOffHand +
|
||||
int32 mitigation = attacker->itembonuses.DSMitigationOffHand +
|
||||
attacker->spellbonuses.DSMitigationOffHand +
|
||||
attacker->aabonuses.DSMitigationOffHand;
|
||||
DS -= DS*mitigation/100;
|
||||
@ -3398,7 +3398,7 @@ bool Mob::HasRangedProcs() const
|
||||
bool Client::CheckDoubleAttack(bool tripleAttack) {
|
||||
|
||||
//Check for bonuses that give you a double attack chance regardless of skill (ie Bestial Frenzy/Harmonious Attack AA)
|
||||
uint16 bonusGiveDA = aabonuses.GiveDoubleAttack + spellbonuses.GiveDoubleAttack + itembonuses.GiveDoubleAttack;
|
||||
uint32 bonusGiveDA = aabonuses.GiveDoubleAttack + spellbonuses.GiveDoubleAttack + itembonuses.GiveDoubleAttack;
|
||||
|
||||
if(!HasSkill(SkillDoubleAttack) && !bonusGiveDA)
|
||||
return false;
|
||||
@ -3407,7 +3407,7 @@ bool Client::CheckDoubleAttack(bool tripleAttack) {
|
||||
|
||||
uint16 skill = GetSkill(SkillDoubleAttack);
|
||||
|
||||
int16 bonusDA = aabonuses.DoubleAttackChance + spellbonuses.DoubleAttackChance + itembonuses.DoubleAttackChance;
|
||||
int32 bonusDA = aabonuses.DoubleAttackChance + spellbonuses.DoubleAttackChance + itembonuses.DoubleAttackChance;
|
||||
|
||||
//Use skill calculations otherwise, if you only have AA applied GiveDoubleAttack chance then use that value as the base.
|
||||
if (skill)
|
||||
@ -3421,7 +3421,7 @@ bool Client::CheckDoubleAttack(bool tripleAttack) {
|
||||
//Kayen: Need to decide if we can implement triple attack skill before working in over the cap effect.
|
||||
if(tripleAttack) {
|
||||
// Only some Double Attack classes get Triple Attack [This is already checked in client_processes.cpp]
|
||||
int16 triple_bonus = spellbonuses.TripleAttackChance + itembonuses.TripleAttackChance;
|
||||
int32 triple_bonus = spellbonuses.TripleAttackChance + itembonuses.TripleAttackChance;
|
||||
chance *= 0.2f; //Baseline chance is 20% of your double attack chance.
|
||||
chance *= float(100.0f+triple_bonus)/100.0f; //Apply modifiers.
|
||||
}
|
||||
@ -3434,7 +3434,7 @@ bool Client::CheckDoubleAttack(bool tripleAttack) {
|
||||
|
||||
bool Client::CheckDoubleRangedAttack() {
|
||||
|
||||
int16 chance = spellbonuses.DoubleRangedAttack + itembonuses.DoubleRangedAttack + aabonuses.DoubleRangedAttack;
|
||||
int32 chance = spellbonuses.DoubleRangedAttack + itembonuses.DoubleRangedAttack + aabonuses.DoubleRangedAttack;
|
||||
|
||||
if(chance && (MakeRandomInt(0, 100) < chance))
|
||||
return true;
|
||||
@ -3866,7 +3866,7 @@ float Mob::GetProcChances(float ProcBonus, uint16 hand)
|
||||
int mydex = GetDEX();
|
||||
float ProcChance = 0.0f;
|
||||
|
||||
uint16 weapon_speed = GetWeaponSpeedbyHand(hand);
|
||||
uint32 weapon_speed = GetWeaponSpeedbyHand(hand);
|
||||
|
||||
if (RuleB(Combat, AdjustProcPerMinute)) {
|
||||
ProcChance = (static_cast<float>(weapon_speed) *
|
||||
@ -3892,7 +3892,7 @@ float Mob::GetDefensiveProcChances(float &ProcBonus, float &ProcChance, uint16 h
|
||||
ProcBonus = 0;
|
||||
ProcChance = 0;
|
||||
|
||||
uint16 weapon_speed = GetWeaponSpeedbyHand(hand);
|
||||
uint32 weapon_speed = GetWeaponSpeedbyHand(hand);
|
||||
|
||||
ProcChance = (static_cast<float>(weapon_speed) * RuleR(Combat, AvgDefProcsPerMinute) / 60000.0f); // compensate for weapon_speed being in ms
|
||||
ProcBonus += static_cast<float>(myagi) * RuleR(Combat, DefProcPerMinAgiContrib) / 100.0f;
|
||||
@ -4147,7 +4147,7 @@ void Mob::TryPetCriticalHit(Mob *defender, uint16 skill, int32 &damage)
|
||||
Mob *owner = nullptr;
|
||||
float critChance = 0.0f;
|
||||
critChance += RuleI(Combat, MeleeBaseCritChance);
|
||||
uint16 critMod = 163;
|
||||
uint32 critMod = 163;
|
||||
|
||||
if (damage < 1) //We can't critical hit if we don't hit.
|
||||
return;
|
||||
@ -4162,8 +4162,8 @@ void Mob::TryPetCriticalHit(Mob *defender, uint16 skill, int32 &damage)
|
||||
if (!owner)
|
||||
return;
|
||||
|
||||
int16 CritPetChance = owner->aabonuses.PetCriticalHit + owner->itembonuses.PetCriticalHit + owner->spellbonuses.PetCriticalHit;
|
||||
int16 CritChanceBonus = GetCriticalChanceBonus(skill);
|
||||
int32 CritPetChance = owner->aabonuses.PetCriticalHit + owner->itembonuses.PetCriticalHit + owner->spellbonuses.PetCriticalHit;
|
||||
int32 CritChanceBonus = GetCriticalChanceBonus(skill);
|
||||
|
||||
if (CritPetChance || critChance) {
|
||||
|
||||
@ -4213,11 +4213,11 @@ void Mob::TryCriticalHit(Mob *defender, uint16 skill, int32 &damage, ExtraAttack
|
||||
//1: Try Slay Undead
|
||||
if (defender && (defender->GetBodyType() == BT_Undead ||
|
||||
defender->GetBodyType() == BT_SummonedUndead || defender->GetBodyType() == BT_Vampire)) {
|
||||
int16 SlayRateBonus = aabonuses.SlayUndead[0] + itembonuses.SlayUndead[0] + spellbonuses.SlayUndead[0];
|
||||
int32 SlayRateBonus = aabonuses.SlayUndead[0] + itembonuses.SlayUndead[0] + spellbonuses.SlayUndead[0];
|
||||
if (SlayRateBonus) {
|
||||
float slayChance = static_cast<float>(SlayRateBonus) / 10000.0f;
|
||||
if (MakeRandomFloat(0, 1) < slayChance) {
|
||||
int16 SlayDmgBonus = aabonuses.SlayUndead[1] + itembonuses.SlayUndead[1] + spellbonuses.SlayUndead[1];
|
||||
int32 SlayDmgBonus = aabonuses.SlayUndead[1] + itembonuses.SlayUndead[1] + spellbonuses.SlayUndead[1];
|
||||
damage = (damage * SlayDmgBonus * 2.25) / 100;
|
||||
if (GetGender() == 1) // female
|
||||
entity_list.FilteredMessageClose_StringID(this, false, 200,
|
||||
@ -4289,9 +4289,9 @@ void Mob::TryCriticalHit(Mob *defender, uint16 skill, int32 &damage, ExtraAttack
|
||||
|
||||
if(MakeRandomFloat(0, 1) < critChance)
|
||||
{
|
||||
uint16 critMod = 200;
|
||||
uint32 critMod = 200;
|
||||
bool crip_success = false;
|
||||
int16 CripplingBlowChance = GetCrippBlowChance();
|
||||
int32 CripplingBlowChance = GetCrippBlowChance();
|
||||
|
||||
//Crippling Blow Chance: The percent value of the effect is applied
|
||||
//to the your Chance to Critical. (ie You have 10% chance to critical and you
|
||||
@ -4347,7 +4347,7 @@ bool Mob::TryFinishingBlow(Mob *defender, SkillUseTypes skillinuse)
|
||||
|
||||
uint32 FB_Dmg = aabonuses.FinishingBlow[1] + spellbonuses.FinishingBlow[1] + itembonuses.FinishingBlow[1];
|
||||
|
||||
uint16 FB_Level = 0;
|
||||
uint32 FB_Level = 0;
|
||||
FB_Level = aabonuses.FinishingBlowLvl[0];
|
||||
if (FB_Level < spellbonuses.FinishingBlowLvl[0])
|
||||
FB_Level = spellbonuses.FinishingBlowLvl[0];
|
||||
@ -4375,7 +4375,7 @@ void Mob::DoRiposte(Mob* defender) {
|
||||
defender->Attack(this, MainPrimary, true);
|
||||
if (HasDied()) return;
|
||||
|
||||
int16 DoubleRipChance = defender->aabonuses.GiveDoubleRiposte[0] +
|
||||
int32 DoubleRipChance = defender->aabonuses.GiveDoubleRiposte[0] +
|
||||
defender->spellbonuses.GiveDoubleRiposte[0] +
|
||||
defender->itembonuses.GiveDoubleRiposte[0];
|
||||
|
||||
@ -4423,7 +4423,7 @@ void Mob::ApplyMeleeDamageBonus(uint16 skill, int32 &damage){
|
||||
|
||||
bool Mob::HasDied() {
|
||||
bool Result = false;
|
||||
int16 hp_below = 0;
|
||||
int32 hp_below = 0;
|
||||
|
||||
hp_below = (GetDelayDeath() * -1);
|
||||
|
||||
@ -4437,7 +4437,7 @@ uint16 Mob::GetDamageTable(SkillUseTypes skillinuse)
|
||||
{
|
||||
if(GetLevel() <= 51)
|
||||
{
|
||||
uint16 ret_table = 0;
|
||||
uint32 ret_table = 0;
|
||||
int str_over_75 = 0;
|
||||
if(GetSTR() > 75)
|
||||
str_over_75 = GetSTR() - 75;
|
||||
@ -4460,7 +4460,7 @@ uint16 Mob::GetDamageTable(SkillUseTypes skillinuse)
|
||||
}
|
||||
else
|
||||
{
|
||||
uint16 dmg_table[] = {
|
||||
uint32 dmg_table[] = {
|
||||
275, 275, 275, 275, 275,
|
||||
280, 280, 280, 280, 285,
|
||||
285, 285, 290, 290, 295,
|
||||
@ -4637,7 +4637,7 @@ void Mob::TrySkillProc(Mob *on, uint16 skill, uint16 ReuseTime, bool Success, ui
|
||||
|
||||
float Mob::GetSkillProcChances(uint16 ReuseTime, uint16 hand) {
|
||||
|
||||
uint16 weapon_speed;
|
||||
uint32 weapon_speed;
|
||||
float ProcChance = 0;
|
||||
|
||||
if (!ReuseTime && hand) {
|
||||
|
||||
@ -306,7 +306,7 @@ void Client::AddItemBonuses(const ItemInst *inst, StatBonuses* newbon, bool isAu
|
||||
}
|
||||
|
||||
//FatherNitwit: New style haste, shields, and regens
|
||||
if(newbon->haste < (int16)item->Haste) {
|
||||
if(newbon->haste < (int32)item->Haste) {
|
||||
newbon->haste = item->Haste;
|
||||
}
|
||||
if(item->Regen > 0)
|
||||
|
||||
212
zone/bot.cpp
212
zone/bot.cpp
@ -338,7 +338,7 @@ bool Bot::IsStanding() {
|
||||
return result;
|
||||
}
|
||||
|
||||
NPCType Bot::FillNPCTypeStruct(uint32 botSpellsID, std::string botName, std::string botLastName, uint8 botLevel, uint16 botRace, uint8 botClass, uint8 gender, float size, uint32 face, uint32 hairStyle, uint32 hairColor, uint32 eyeColor, uint32 eyeColor2, uint32 beardColor, uint32 beard, uint32 drakkinHeritage, uint32 drakkinTattoo, uint32 drakkinDetails, int32 hp, int32 mana, int16 mr, int16 cr, int16 dr, int16 fr, int16 pr, int16 corrup, int16 ac, uint16 str, uint16 sta, uint16 dex, uint16 agi, uint16 _int, uint16 wis, uint16 cha, uint16 attack) {
|
||||
NPCType Bot::FillNPCTypeStruct(uint32 botSpellsID, std::string botName, std::string botLastName, uint8 botLevel, uint16 botRace, uint8 botClass, uint8 gender, float size, uint32 face, uint32 hairStyle, uint32 hairColor, uint32 eyeColor, uint32 eyeColor2, uint32 beardColor, uint32 beard, uint32 drakkinHeritage, uint32 drakkinTattoo, uint32 drakkinDetails, int32 hp, int32 mana, int32 mr, int32 cr, int32 dr, int32 fr, int32 pr, int32 corrup, int32 ac, uint32 str, uint32 sta, uint32 dex, uint32 agi, uint32 _int, uint32 wis, uint32 cha, uint32 attack) {
|
||||
NPCType BotNPCType;
|
||||
int CopyLength = 0;
|
||||
|
||||
@ -459,20 +459,20 @@ void Bot::GenerateBaseStats() {
|
||||
int BotSpellID = 0;
|
||||
|
||||
// base stats
|
||||
uint16 Strength = _baseSTR;
|
||||
uint16 Stamina = _baseSTA;
|
||||
uint16 Dexterity = _baseDEX;
|
||||
uint16 Agility = _baseAGI;
|
||||
uint16 Wisdom = _baseWIS;
|
||||
uint16 Intelligence = _baseINT;
|
||||
uint16 Charisma = _baseCHA;
|
||||
uint16 Attack = _baseATK;
|
||||
int16 MagicResist = _baseMR;
|
||||
int16 FireResist = _baseFR;
|
||||
int16 DiseaseResist = _baseDR;
|
||||
int16 PoisonResist = _basePR;
|
||||
int16 ColdResist = _baseCR;
|
||||
int16 CorruptionResist = _baseCorrup;
|
||||
uint32 Strength = _baseSTR;
|
||||
uint32 Stamina = _baseSTA;
|
||||
uint32 Dexterity = _baseDEX;
|
||||
uint32 Agility = _baseAGI;
|
||||
uint32 Wisdom = _baseWIS;
|
||||
uint32 Intelligence = _baseINT;
|
||||
uint32 Charisma = _baseCHA;
|
||||
uint32 Attack = _baseATK;
|
||||
int32 MagicResist = _baseMR;
|
||||
int32 FireResist = _baseFR;
|
||||
int32 DiseaseResist = _baseDR;
|
||||
int32 PoisonResist = _basePR;
|
||||
int32 ColdResist = _baseCR;
|
||||
int32 CorruptionResist = _baseCorrup;
|
||||
|
||||
switch(this->GetClass()) {
|
||||
case 1: // Warrior (why not just use 'case WARRIOR:'?)
|
||||
@ -845,7 +845,7 @@ void Bot::GenerateAppearance() {
|
||||
|
||||
}
|
||||
|
||||
int16 Bot::acmod()
|
||||
int32 Bot::acmod()
|
||||
{
|
||||
int agility = GetAGI();
|
||||
int level = GetLevel();
|
||||
@ -1352,10 +1352,10 @@ uint16 Bot::MaxSkill(SkillUseTypes skillid, uint16 class_, uint16 level) const {
|
||||
return(database.GetSkillCap(class_, skillid, level));
|
||||
}
|
||||
|
||||
uint16 Bot::GetTotalATK()
|
||||
uint32 Bot::GetTotalATK()
|
||||
{
|
||||
uint16 AttackRating = 0;
|
||||
uint16 WornCap = itembonuses.ATK;
|
||||
uint32 AttackRating = 0;
|
||||
uint32 WornCap = itembonuses.ATK;
|
||||
|
||||
if(IsBot()) {
|
||||
AttackRating = ((WornCap * 1.342) + (GetSkill(SkillOffense) * 1.345) + ((GetSTR() - 66) * 0.9) + (GetPrimarySkillValue() * 2.69));
|
||||
@ -1372,9 +1372,9 @@ uint16 Bot::GetTotalATK()
|
||||
return AttackRating;
|
||||
}
|
||||
|
||||
uint16 Bot::GetATKRating()
|
||||
uint32 Bot::GetATKRating()
|
||||
{
|
||||
uint16 AttackRating = 0;
|
||||
uint32 AttackRating = 0;
|
||||
if(IsBot()) {
|
||||
AttackRating = (GetSkill(SkillOffense) * 1.345) + ((GetSTR() - 66) * 0.9) + (GetPrimarySkillValue() * 2.69);
|
||||
|
||||
@ -1388,9 +1388,9 @@ int32 Bot::GenerateBaseHitPoints()
|
||||
{
|
||||
// Calc Base Hit Points
|
||||
int new_base_hp = 0;
|
||||
uint16 lm = GetClassLevelFactor();
|
||||
uint16 Post255;
|
||||
uint16 NormalSTA = GetSTA();
|
||||
uint32 lm = GetClassLevelFactor();
|
||||
uint32 Post255;
|
||||
uint32 NormalSTA = GetSTA();
|
||||
|
||||
if(GetOwner() && GetOwner()->CastToClient() && GetOwner()->CastToClient()->GetClientVersion() >= EQClientSoD && RuleB(Character, SoDClientUseSoDHPManaEnd))
|
||||
{
|
||||
@ -2566,8 +2566,8 @@ void Bot::LoadPet() {
|
||||
|
||||
if(PetSaveId > 0 && !GetPet() && PetSaveId <= SPDAT_RECORDS) {
|
||||
std::string petName;
|
||||
uint16 petMana = 0;
|
||||
uint16 petHitPoints = 0;
|
||||
uint32 petMana = 0;
|
||||
uint32 petHitPoints = 0;
|
||||
uint32 botPetId = 0;
|
||||
|
||||
LoadPetStats(&petName, &petMana, &petHitPoints, &botPetId, PetSaveId);
|
||||
@ -2593,7 +2593,7 @@ void Bot::LoadPet() {
|
||||
}
|
||||
}
|
||||
|
||||
void Bot::LoadPetStats(std::string* petName, uint16* petMana, uint16* petHitPoints, uint32* botPetId, uint32 botPetSaveId) {
|
||||
void Bot::LoadPetStats(std::string* petName, uint32* petMana, uint32* petHitPoints, uint32* botPetId, uint32 botPetSaveId) {
|
||||
if(botPetSaveId == 0)
|
||||
return;
|
||||
|
||||
@ -2706,7 +2706,7 @@ void Bot::SavePet() {
|
||||
}
|
||||
}
|
||||
|
||||
uint32 Bot::SavePetStats(std::string petName, uint16 petMana, uint16 petHitPoints, uint32 botPetId) {
|
||||
uint32 Bot::SavePetStats(std::string petName, uint32 petMana, uint32 petHitPoints, uint32 botPetId) {
|
||||
|
||||
std::string query = StringFormat("REPLACE INTO botpets SET PetId = %u, BotId = %u, Name = '%s', "
|
||||
"Mana = %u, HitPoints = %u;", botPetId, GetBotID(), petName.c_str(),
|
||||
@ -3068,7 +3068,7 @@ void Bot::BotRangedAttack(Mob* other) {
|
||||
bool Bot::CheckBotDoubleAttack(bool tripleAttack) {
|
||||
|
||||
//Check for bonuses that give you a double attack chance regardless of skill (ie Bestial Frenzy/Harmonious Attack AA)
|
||||
uint16 bonusGiveDA = aabonuses.GiveDoubleAttack + spellbonuses.GiveDoubleAttack + itembonuses.GiveDoubleAttack;
|
||||
uint32 bonusGiveDA = aabonuses.GiveDoubleAttack + spellbonuses.GiveDoubleAttack + itembonuses.GiveDoubleAttack;
|
||||
|
||||
// If you don't have the double attack skill, return
|
||||
if(!GetSkill(SkillDoubleAttack) && !(GetClass() == BARD || GetClass() == BEASTLORD))
|
||||
@ -3079,7 +3079,7 @@ bool Bot::CheckBotDoubleAttack(bool tripleAttack) {
|
||||
|
||||
uint16 skill = GetSkill(SkillDoubleAttack);
|
||||
|
||||
int16 bonusDA = aabonuses.DoubleAttackChance + spellbonuses.DoubleAttackChance + itembonuses.DoubleAttackChance;
|
||||
int32 bonusDA = aabonuses.DoubleAttackChance + spellbonuses.DoubleAttackChance + itembonuses.DoubleAttackChance;
|
||||
|
||||
//Use skill calculations otherwise, if you only have AA applied GiveDoubleAttack chance then use that value as the base.
|
||||
if (skill)
|
||||
@ -3093,7 +3093,7 @@ bool Bot::CheckBotDoubleAttack(bool tripleAttack) {
|
||||
//Kayen: Need to decide if we can implement triple attack skill before working in over the cap effect.
|
||||
if(tripleAttack) {
|
||||
// Only some Double Attack classes get Triple Attack [This is already checked in client_processes.cpp]
|
||||
int16 triple_bonus = spellbonuses.TripleAttackChance + itembonuses.TripleAttackChance;
|
||||
int32 triple_bonus = spellbonuses.TripleAttackChance + itembonuses.TripleAttackChance;
|
||||
chance *= 0.2f; //Baseline chance is 20% of your double attack chance.
|
||||
chance *= float(100.0f+triple_bonus)/100.0f; //Apply modifiers.
|
||||
}
|
||||
@ -3612,7 +3612,7 @@ void Bot::AI_Process() {
|
||||
}
|
||||
|
||||
//Live AA - Flurry, Rapid Strikes ect (Flurry does not require Triple Attack).
|
||||
int16 flurrychance = aabonuses.FlurryChance + spellbonuses.FlurryChance + itembonuses.FlurryChance;
|
||||
int32 flurrychance = aabonuses.FlurryChance + spellbonuses.FlurryChance + itembonuses.FlurryChance;
|
||||
|
||||
if (GetTarget() && flurrychance)
|
||||
{
|
||||
@ -3624,7 +3624,7 @@ void Bot::AI_Process() {
|
||||
}
|
||||
}
|
||||
|
||||
int16 ExtraAttackChanceBonus = spellbonuses.ExtraAttackChance + itembonuses.ExtraAttackChance + aabonuses.ExtraAttackChance;
|
||||
int32 ExtraAttackChanceBonus = spellbonuses.ExtraAttackChance + itembonuses.ExtraAttackChance + aabonuses.ExtraAttackChance;
|
||||
|
||||
if (GetTarget() && ExtraAttackChanceBonus) {
|
||||
ItemInst *wpn = GetBotItem(MainPrimary);
|
||||
@ -3673,9 +3673,9 @@ void Bot::AI_Process() {
|
||||
if(bIsFist || ((weapontype != ItemType2HSlash) && (weapontype != ItemType2HPiercing) && (weapontype != ItemType2HBlunt))) {
|
||||
float DualWieldProbability = 0.0f;
|
||||
|
||||
int16 Ambidexterity = aabonuses.Ambidexterity + spellbonuses.Ambidexterity + itembonuses.Ambidexterity;
|
||||
int32 Ambidexterity = aabonuses.Ambidexterity + spellbonuses.Ambidexterity + itembonuses.Ambidexterity;
|
||||
DualWieldProbability = (GetSkill(SkillDualWield) + GetLevel() + Ambidexterity) / 400.0f; // 78.0 max
|
||||
int16 DWBonus = spellbonuses.DualWieldChance + itembonuses.DualWieldChance;
|
||||
int32 DWBonus = spellbonuses.DualWieldChance + itembonuses.DualWieldChance;
|
||||
DualWieldProbability += DualWieldProbability*float(DWBonus)/ 100.0f;
|
||||
|
||||
float random = MakeRandomFloat(0, 1);
|
||||
@ -6254,7 +6254,7 @@ bool Bot::Attack(Mob* other, int Hand, bool FromRiposte, bool IsStrikethrough, b
|
||||
if (Hand == MainSecondary) {// Do we even have it & was attack with mainhand? If not, don't bother with other calculations
|
||||
//Live AA - SlipperyAttacks
|
||||
//This spell effect most likely directly modifies the actual riposte chance when using offhand attack.
|
||||
int16 OffhandRiposteFail = aabonuses.OffhandRiposteFail + itembonuses.OffhandRiposteFail + spellbonuses.OffhandRiposteFail;
|
||||
int32 OffhandRiposteFail = aabonuses.OffhandRiposteFail + itembonuses.OffhandRiposteFail + spellbonuses.OffhandRiposteFail;
|
||||
OffhandRiposteFail *= -1; //Live uses a negative value for this.
|
||||
|
||||
if (OffhandRiposteFail &&
|
||||
@ -6272,7 +6272,7 @@ bool Bot::Attack(Mob* other, int Hand, bool FromRiposte, bool IsStrikethrough, b
|
||||
}
|
||||
|
||||
if (((damage < 0) || slippery_attack) && !FromRiposte && !IsStrikethrough) { // Hack to still allow Strikethrough chance w/ Slippery Attacks AA
|
||||
int16 bonusStrikeThrough = itembonuses.StrikeThrough + spellbonuses.StrikeThrough + aabonuses.StrikeThrough;
|
||||
int32 bonusStrikeThrough = itembonuses.StrikeThrough + spellbonuses.StrikeThrough + aabonuses.StrikeThrough;
|
||||
|
||||
if(bonusStrikeThrough && (MakeRandomInt(0, 100) < bonusStrikeThrough)) {
|
||||
Message_StringID(MT_StrikeThrough, STRIKETHROUGH_STRING); // You strike through your opponents defenses!
|
||||
@ -6347,11 +6347,11 @@ bool Bot::Attack(Mob* other, int Hand, bool FromRiposte, bool IsStrikethrough, b
|
||||
return false;
|
||||
}
|
||||
|
||||
int16 Bot::CalcBotAAFocus(BotfocusType type, uint32 aa_ID, uint16 spell_id)
|
||||
int32 Bot::CalcBotAAFocus(BotfocusType type, uint32 aa_ID, uint16 spell_id)
|
||||
{
|
||||
const SPDat_Spell_Struct &spell = spells[spell_id];
|
||||
|
||||
int16 value = 0;
|
||||
int32 value = 0;
|
||||
int lvlModifier = 100;
|
||||
int spell_level = 0;
|
||||
int lvldiff = 0;
|
||||
@ -6765,13 +6765,13 @@ int16 Bot::CalcBotAAFocus(BotfocusType type, uint32 aa_ID, uint16 spell_id)
|
||||
return(value*lvlModifier/100);
|
||||
}
|
||||
|
||||
int16 Bot::GetBotFocusEffect(BotfocusType bottype, uint16 spell_id) {
|
||||
int32 Bot::GetBotFocusEffect(BotfocusType bottype, uint16 spell_id) {
|
||||
if (IsBardSong(spell_id) && bottype != BotfocusFcBaseEffects)
|
||||
return 0;
|
||||
|
||||
int16 realTotal = 0;
|
||||
int16 realTotal2 = 0;
|
||||
int16 realTotal3 = 0;
|
||||
int32 realTotal = 0;
|
||||
int32 realTotal2 = 0;
|
||||
int32 realTotal3 = 0;
|
||||
bool rand_effectiveness = false;
|
||||
|
||||
//Improved Healing, Damage & Mana Reduction are handled differently in that some are random percentages
|
||||
@ -6789,9 +6789,9 @@ int16 Bot::GetBotFocusEffect(BotfocusType bottype, uint16 spell_id) {
|
||||
const Item_Struct* UsedItem = 0;
|
||||
const ItemInst* TempInst = 0;
|
||||
uint16 UsedFocusID = 0;
|
||||
int16 Total = 0;
|
||||
int16 focus_max = 0;
|
||||
int16 focus_max_real = 0;
|
||||
int32 Total = 0;
|
||||
int32 focus_max = 0;
|
||||
int32 focus_max_real = 0;
|
||||
|
||||
//item focus
|
||||
for(int x = EmuConstants::EQUIPMENT_BEGIN; x <= EmuConstants::EQUIPMENT_END; x++)
|
||||
@ -6873,14 +6873,14 @@ int16 Bot::GetBotFocusEffect(BotfocusType bottype, uint16 spell_id) {
|
||||
if (spellbonuses.FocusEffects[bottype]){
|
||||
|
||||
//Spell Focus
|
||||
int16 Total2 = 0;
|
||||
int16 focus_max2 = 0;
|
||||
int16 focus_max_real2 = 0;
|
||||
int32 Total2 = 0;
|
||||
int32 focus_max2 = 0;
|
||||
int32 focus_max_real2 = 0;
|
||||
|
||||
int buff_tracker = -1;
|
||||
int buff_slot = 0;
|
||||
uint16 focusspellid = 0;
|
||||
uint16 focusspell_tracker = 0;
|
||||
uint32 focusspellid = 0;
|
||||
uint32 focusspell_tracker = 0;
|
||||
uint32 buff_max = GetMaxTotalSlots();
|
||||
for (buff_slot = 0; buff_slot < buff_max; buff_slot++) {
|
||||
focusspellid = buffs[buff_slot].spellid;
|
||||
@ -6926,7 +6926,7 @@ int16 Bot::GetBotFocusEffect(BotfocusType bottype, uint16 spell_id) {
|
||||
if (aabonuses.FocusEffects[bottype]){
|
||||
|
||||
int totalAAs = database.CountAAs();
|
||||
int16 Total3 = 0;
|
||||
int32 Total3 = 0;
|
||||
uint32 slots = 0;
|
||||
uint32 aa_AA = 0;
|
||||
uint32 aa_value = 0;
|
||||
@ -6962,14 +6962,14 @@ int16 Bot::GetBotFocusEffect(BotfocusType bottype, uint16 spell_id) {
|
||||
return realTotal + realTotal2;
|
||||
}
|
||||
|
||||
int16 Bot::CalcBotFocusEffect(BotfocusType bottype, uint16 focus_id, uint16 spell_id, bool best_focus) {
|
||||
int32 Bot::CalcBotFocusEffect(BotfocusType bottype, uint16 focus_id, uint16 spell_id, bool best_focus) {
|
||||
if(!IsValidSpell(focus_id) || !IsValidSpell(spell_id))
|
||||
return 0;
|
||||
|
||||
const SPDat_Spell_Struct &focus_spell = spells[focus_id];
|
||||
const SPDat_Spell_Struct &spell = spells[spell_id];
|
||||
|
||||
int16 value = 0;
|
||||
int32 value = 0;
|
||||
int lvlModifier = 100;
|
||||
int spell_level = 0;
|
||||
int lvldiff = 0;
|
||||
@ -7025,7 +7025,7 @@ int16 Bot::CalcBotFocusEffect(BotfocusType bottype, uint16 focus_id, uint16 spel
|
||||
break;
|
||||
|
||||
case SE_LimitCastTimeMin:
|
||||
if (spells[spell_id].cast_time < (uint16)focus_spell.base[i])
|
||||
if (spells[spell_id].cast_time < (uint32)focus_spell.base[i])
|
||||
return(0);
|
||||
break;
|
||||
|
||||
@ -7403,7 +7403,7 @@ int16 Bot::CalcBotFocusEffect(BotfocusType bottype, uint16 focus_id, uint16 spel
|
||||
float Bot::GetProcChances(float ProcBonus, uint16 hand) {
|
||||
int mydex = GetDEX();
|
||||
float ProcChance = 0.0f;
|
||||
uint16 weapon_speed = 0;
|
||||
uint32 weapon_speed = 0;
|
||||
switch (hand) {
|
||||
case MainPrimary:
|
||||
weapon_speed = attack_timer.GetDuration();
|
||||
@ -7686,7 +7686,7 @@ void Bot::DoRiposte(Mob* defender) {
|
||||
defender->Attack(this, MainPrimary, true);
|
||||
|
||||
//double riposte
|
||||
int16 DoubleRipChance = defender->GetAABonuses().GiveDoubleRiposte[0] +
|
||||
int32 DoubleRipChance = defender->GetAABonuses().GiveDoubleRiposte[0] +
|
||||
defender->GetSpellBonuses().GiveDoubleRiposte[0] +
|
||||
defender->GetItemBonuses().GiveDoubleRiposte[0];
|
||||
|
||||
@ -8214,7 +8214,7 @@ void Bot::DoClassAttacks(Mob *target, bool IsRiposte) {
|
||||
MonkSpecialAttack(target, skill_to_use);
|
||||
|
||||
//Live AA - Technique of Master Wu
|
||||
uint16 bDoubleSpecialAttack = itembonuses.DoubleSpecialAttack + spellbonuses.DoubleSpecialAttack + aabonuses.DoubleSpecialAttack;
|
||||
uint32 bDoubleSpecialAttack = itembonuses.DoubleSpecialAttack + spellbonuses.DoubleSpecialAttack + aabonuses.DoubleSpecialAttack;
|
||||
if( bDoubleSpecialAttack && (bDoubleSpecialAttack >= 100 || bDoubleSpecialAttack > MakeRandomInt(0,100))) {
|
||||
|
||||
int MonkSPA [5] = { SkillFlyingKick, SkillDragonPunch, SkillEagleStrike, SkillTigerClaw, SkillRoundKick };
|
||||
@ -8800,7 +8800,7 @@ int32 Bot::GetActSpellHealing(uint16 spell_id, int32 value, Mob* target) {
|
||||
target = this;
|
||||
|
||||
int32 value_BaseEffect = 0;
|
||||
int16 chance = 0;
|
||||
int32 chance = 0;
|
||||
int8 modifier = 1;
|
||||
bool Critical = false;
|
||||
|
||||
@ -8950,7 +8950,7 @@ int32 Bot::GetActSpellCost(uint16 spell_id, int32 cost) {
|
||||
// Formula = Unknown exact, based off a random percent chance up to mana cost(after focuses) of the cast spell
|
||||
if(this->itembonuses.Clairvoyance && spells[spell_id].classes[(GetClass()%16) - 1] >= GetLevel() - 5)
|
||||
{
|
||||
int16 mana_back = this->itembonuses.Clairvoyance * MakeRandomInt(1, 100) / 100;
|
||||
int32 mana_back = this->itembonuses.Clairvoyance * MakeRandomInt(1, 100) / 100;
|
||||
// Doesnt generate mana, so best case is a free spell
|
||||
if(mana_back > cost)
|
||||
mana_back = cost;
|
||||
@ -9011,7 +9011,7 @@ int32 Bot::GetActSpellCost(uint16 spell_id, int32 cost) {
|
||||
}
|
||||
}
|
||||
|
||||
int16 focus_redux = GetBotFocusEffect(BotfocusManaCost, spell_id);
|
||||
int32 focus_redux = GetBotFocusEffect(BotfocusManaCost, spell_id);
|
||||
|
||||
if(focus_redux > 0)
|
||||
{
|
||||
@ -9659,9 +9659,9 @@ int32 Bot::CalcManaRegenCap(){
|
||||
}
|
||||
|
||||
// Return max stat value for level
|
||||
int16 Bot::GetMaxStat() {
|
||||
int32 Bot::GetMaxStat() {
|
||||
int level = GetLevel();
|
||||
int16 base = 0;
|
||||
int32 base = 0;
|
||||
|
||||
if (level < 61) {
|
||||
base = 255;
|
||||
@ -9679,10 +9679,10 @@ int16 Bot::GetMaxStat() {
|
||||
return(base);
|
||||
}
|
||||
|
||||
int16 Bot::GetMaxResist() {
|
||||
int32 Bot::GetMaxResist() {
|
||||
int level = GetLevel();
|
||||
|
||||
int16 base = 500;
|
||||
int32 base = 500;
|
||||
|
||||
if(level > 60)
|
||||
base += ((level - 60) * 5);
|
||||
@ -9690,89 +9690,89 @@ int16 Bot::GetMaxResist() {
|
||||
return base;
|
||||
}
|
||||
|
||||
int16 Bot::GetMaxSTR() {
|
||||
int32 Bot::GetMaxSTR() {
|
||||
return GetMaxStat()
|
||||
+ itembonuses.STRCapMod
|
||||
+ spellbonuses.STRCapMod
|
||||
+ aabonuses.STRCapMod;
|
||||
}
|
||||
int16 Bot::GetMaxSTA() {
|
||||
int32 Bot::GetMaxSTA() {
|
||||
return GetMaxStat()
|
||||
+ itembonuses.STACapMod
|
||||
+ spellbonuses.STACapMod
|
||||
+ aabonuses.STACapMod;
|
||||
}
|
||||
int16 Bot::GetMaxDEX() {
|
||||
int32 Bot::GetMaxDEX() {
|
||||
return GetMaxStat()
|
||||
+ itembonuses.DEXCapMod
|
||||
+ spellbonuses.DEXCapMod
|
||||
+ aabonuses.DEXCapMod;
|
||||
}
|
||||
int16 Bot::GetMaxAGI() {
|
||||
int32 Bot::GetMaxAGI() {
|
||||
return GetMaxStat()
|
||||
+ itembonuses.AGICapMod
|
||||
+ spellbonuses.AGICapMod
|
||||
+ aabonuses.AGICapMod;
|
||||
}
|
||||
int16 Bot::GetMaxINT() {
|
||||
int32 Bot::GetMaxINT() {
|
||||
return GetMaxStat()
|
||||
+ itembonuses.INTCapMod
|
||||
+ spellbonuses.INTCapMod
|
||||
+ aabonuses.INTCapMod;
|
||||
}
|
||||
int16 Bot::GetMaxWIS() {
|
||||
int32 Bot::GetMaxWIS() {
|
||||
return GetMaxStat()
|
||||
+ itembonuses.WISCapMod
|
||||
+ spellbonuses.WISCapMod
|
||||
+ aabonuses.WISCapMod;
|
||||
}
|
||||
int16 Bot::GetMaxCHA() {
|
||||
int32 Bot::GetMaxCHA() {
|
||||
return GetMaxStat()
|
||||
+ itembonuses.CHACapMod
|
||||
+ spellbonuses.CHACapMod
|
||||
+ aabonuses.CHACapMod;
|
||||
}
|
||||
int16 Bot::GetMaxMR() {
|
||||
int32 Bot::GetMaxMR() {
|
||||
return GetMaxResist()
|
||||
+ itembonuses.MRCapMod
|
||||
+ spellbonuses.MRCapMod
|
||||
+ aabonuses.MRCapMod;
|
||||
}
|
||||
int16 Bot::GetMaxPR() {
|
||||
int32 Bot::GetMaxPR() {
|
||||
return GetMaxResist()
|
||||
+ itembonuses.PRCapMod
|
||||
+ spellbonuses.PRCapMod
|
||||
+ aabonuses.PRCapMod;
|
||||
}
|
||||
int16 Bot::GetMaxDR() {
|
||||
int32 Bot::GetMaxDR() {
|
||||
return GetMaxResist()
|
||||
+ itembonuses.DRCapMod
|
||||
+ spellbonuses.DRCapMod
|
||||
+ aabonuses.DRCapMod;
|
||||
}
|
||||
int16 Bot::GetMaxCR() {
|
||||
int32 Bot::GetMaxCR() {
|
||||
return GetMaxResist()
|
||||
+ itembonuses.CRCapMod
|
||||
+ spellbonuses.CRCapMod
|
||||
+ aabonuses.CRCapMod;
|
||||
}
|
||||
int16 Bot::GetMaxFR() {
|
||||
int32 Bot::GetMaxFR() {
|
||||
return GetMaxResist()
|
||||
+ itembonuses.FRCapMod
|
||||
+ spellbonuses.FRCapMod
|
||||
+ aabonuses.FRCapMod;
|
||||
}
|
||||
int16 Bot::GetMaxCorrup() {
|
||||
int32 Bot::GetMaxCorrup() {
|
||||
return GetMaxResist()
|
||||
+ itembonuses.CorrupCapMod
|
||||
+ spellbonuses.CorrupCapMod
|
||||
+ aabonuses.CorrupCapMod;
|
||||
}
|
||||
|
||||
int16 Bot::CalcSTR() {
|
||||
int16 val = STR + itembonuses.STR + spellbonuses.STR;
|
||||
int32 Bot::CalcSTR() {
|
||||
int32 val = STR + itembonuses.STR + spellbonuses.STR;
|
||||
|
||||
int16 mod = aabonuses.STR;
|
||||
int32 mod = aabonuses.STR;
|
||||
|
||||
if(val>255 && GetLevel() <= 60)
|
||||
val = 255;
|
||||
@ -9788,10 +9788,10 @@ int16 Bot::CalcSTR() {
|
||||
return(STR);
|
||||
}
|
||||
|
||||
int16 Bot::CalcSTA() {
|
||||
int16 val = STA + itembonuses.STA + spellbonuses.STA;
|
||||
int32 Bot::CalcSTA() {
|
||||
int32 val = STA + itembonuses.STA + spellbonuses.STA;
|
||||
|
||||
int16 mod = aabonuses.STA;
|
||||
int32 mod = aabonuses.STA;
|
||||
|
||||
if(val>255 && GetLevel() <= 60)
|
||||
val = 255;
|
||||
@ -9807,9 +9807,9 @@ int16 Bot::CalcSTA() {
|
||||
return(STA);
|
||||
}
|
||||
|
||||
int16 Bot::CalcAGI() {
|
||||
int16 val = AGI + itembonuses.AGI + spellbonuses.AGI;
|
||||
int16 mod = aabonuses.AGI;
|
||||
int32 Bot::CalcAGI() {
|
||||
int32 val = AGI + itembonuses.AGI + spellbonuses.AGI;
|
||||
int32 mod = aabonuses.AGI;
|
||||
|
||||
if(val>255 && GetLevel() <= 60)
|
||||
val = 255;
|
||||
@ -9826,10 +9826,10 @@ int16 Bot::CalcAGI() {
|
||||
return(AGI);
|
||||
}
|
||||
|
||||
int16 Bot::CalcDEX() {
|
||||
int16 val = DEX + itembonuses.DEX + spellbonuses.DEX;
|
||||
int32 Bot::CalcDEX() {
|
||||
int32 val = DEX + itembonuses.DEX + spellbonuses.DEX;
|
||||
|
||||
int16 mod = aabonuses.DEX;
|
||||
int32 mod = aabonuses.DEX;
|
||||
|
||||
if(val>255 && GetLevel() <= 60)
|
||||
val = 255;
|
||||
@ -9845,10 +9845,10 @@ int16 Bot::CalcDEX() {
|
||||
return(DEX);
|
||||
}
|
||||
|
||||
int16 Bot::CalcINT() {
|
||||
int16 val = INT + itembonuses.INT + spellbonuses.INT;
|
||||
int32 Bot::CalcINT() {
|
||||
int32 val = INT + itembonuses.INT + spellbonuses.INT;
|
||||
|
||||
int16 mod = aabonuses.INT;
|
||||
int32 mod = aabonuses.INT;
|
||||
|
||||
if(val>255 && GetLevel() <= 60)
|
||||
val = 255;
|
||||
@ -9863,10 +9863,10 @@ int16 Bot::CalcINT() {
|
||||
return(INT);
|
||||
}
|
||||
|
||||
int16 Bot::CalcWIS() {
|
||||
int16 val = WIS + itembonuses.WIS + spellbonuses.WIS;
|
||||
int32 Bot::CalcWIS() {
|
||||
int32 val = WIS + itembonuses.WIS + spellbonuses.WIS;
|
||||
|
||||
int16 mod = aabonuses.WIS;
|
||||
int32 mod = aabonuses.WIS;
|
||||
|
||||
if(val>255 && GetLevel() <= 60)
|
||||
val = 255;
|
||||
@ -9882,10 +9882,10 @@ int16 Bot::CalcWIS() {
|
||||
return(WIS);
|
||||
}
|
||||
|
||||
int16 Bot::CalcCHA() {
|
||||
int16 val = CHA + itembonuses.CHA + spellbonuses.CHA;
|
||||
int32 Bot::CalcCHA() {
|
||||
int32 val = CHA + itembonuses.CHA + spellbonuses.CHA;
|
||||
|
||||
int16 mod = aabonuses.CHA;
|
||||
int32 mod = aabonuses.CHA;
|
||||
|
||||
if(val>255 && GetLevel() <= 60)
|
||||
val = 255;
|
||||
@ -9904,7 +9904,7 @@ int16 Bot::CalcCHA() {
|
||||
//The AA multipliers are set to be 5, but were 2 on WR
|
||||
//The resistant discipline which I think should be here is implemented
|
||||
//in Mob::ResistSpell
|
||||
int16 Bot::CalcMR()
|
||||
int32 Bot::CalcMR()
|
||||
{
|
||||
MR += itembonuses.MR + spellbonuses.MR + aabonuses.MR;
|
||||
|
||||
@ -9920,7 +9920,7 @@ int16 Bot::CalcMR()
|
||||
return(MR);
|
||||
}
|
||||
|
||||
int16 Bot::CalcFR()
|
||||
int32 Bot::CalcFR()
|
||||
{
|
||||
int c = GetClass();
|
||||
if(c == RANGER) {
|
||||
@ -9942,7 +9942,7 @@ int16 Bot::CalcFR()
|
||||
return(FR);
|
||||
}
|
||||
|
||||
int16 Bot::CalcDR()
|
||||
int32 Bot::CalcDR()
|
||||
{
|
||||
int c = GetClass();
|
||||
if(c == PALADIN) {
|
||||
@ -9971,7 +9971,7 @@ int16 Bot::CalcDR()
|
||||
return(DR);
|
||||
}
|
||||
|
||||
int16 Bot::CalcPR()
|
||||
int32 Bot::CalcPR()
|
||||
{
|
||||
int c = GetClass();
|
||||
if(c == ROGUE) {
|
||||
@ -10000,7 +10000,7 @@ int16 Bot::CalcPR()
|
||||
return(PR);
|
||||
}
|
||||
|
||||
int16 Bot::CalcCR()
|
||||
int32 Bot::CalcCR()
|
||||
{
|
||||
int c = GetClass();
|
||||
if(c == RANGER) {
|
||||
@ -10022,7 +10022,7 @@ int16 Bot::CalcCR()
|
||||
return(CR);
|
||||
}
|
||||
|
||||
int16 Bot::CalcCorrup()
|
||||
int32 Bot::CalcCorrup()
|
||||
{
|
||||
Corrup = Corrup + itembonuses.Corrup + spellbonuses.Corrup + aabonuses.Corrup;
|
||||
|
||||
@ -10032,7 +10032,7 @@ int16 Bot::CalcCorrup()
|
||||
return(Corrup);
|
||||
}
|
||||
|
||||
int16 Bot::CalcATK() {
|
||||
int32 Bot::CalcATK() {
|
||||
ATK = itembonuses.ATK + spellbonuses.ATK + aabonuses.ATK + GroupLeadershipAAOffenseEnhancement();
|
||||
return(ATK);
|
||||
}
|
||||
|
||||
198
zone/bot.h
198
zone/bot.h
@ -174,8 +174,8 @@ public:
|
||||
virtual void DoRiposte(Mob* defender);
|
||||
inline virtual int32 GetATK() const { return ATK + itembonuses.ATK + spellbonuses.ATK + ((GetSTR() + GetSkill(SkillOffense)) * 9 / 10); }
|
||||
inline virtual int32 GetATKBonus() const { return itembonuses.ATK + spellbonuses.ATK; }
|
||||
uint16 GetTotalATK();
|
||||
uint16 GetATKRating();
|
||||
uint32 GetTotalATK();
|
||||
uint32 GetATKRating();
|
||||
uint16 GetPrimarySkillValue();
|
||||
uint16 MaxSkill(SkillUseTypes skillid, uint16 class_, uint16 level) const;
|
||||
inline uint16 MaxSkill(SkillUseTypes skillid) const { return MaxSkill(skillid, GetClass(), GetLevel()); }
|
||||
@ -238,35 +238,35 @@ public:
|
||||
void ClearHealRotationLeader() { _healRotationLeader = 0; }
|
||||
void ClearHealRotationMembers();
|
||||
void ClearHealRotationTargets();
|
||||
inline virtual int16 GetMaxStat();
|
||||
inline virtual int16 GetMaxResist();
|
||||
inline virtual int16 GetMaxSTR();
|
||||
inline virtual int16 GetMaxSTA();
|
||||
inline virtual int16 GetMaxDEX();
|
||||
inline virtual int16 GetMaxAGI();
|
||||
inline virtual int16 GetMaxINT();
|
||||
inline virtual int16 GetMaxWIS();
|
||||
inline virtual int16 GetMaxCHA();
|
||||
inline virtual int16 GetMaxMR();
|
||||
inline virtual int16 GetMaxPR();
|
||||
inline virtual int16 GetMaxDR();
|
||||
inline virtual int16 GetMaxCR();
|
||||
inline virtual int16 GetMaxFR();
|
||||
inline virtual int16 GetMaxCorrup();
|
||||
int16 CalcATK();
|
||||
int16 CalcSTR();
|
||||
int16 CalcSTA();
|
||||
int16 CalcDEX();
|
||||
int16 CalcAGI();
|
||||
int16 CalcINT();
|
||||
int16 CalcWIS();
|
||||
int16 CalcCHA();
|
||||
int16 CalcMR();
|
||||
int16 CalcFR();
|
||||
int16 CalcDR();
|
||||
int16 CalcPR();
|
||||
int16 CalcCR();
|
||||
int16 CalcCorrup();
|
||||
inline virtual int32 GetMaxStat();
|
||||
inline virtual int32 GetMaxResist();
|
||||
inline virtual int32 GetMaxSTR();
|
||||
inline virtual int32 GetMaxSTA();
|
||||
inline virtual int32 GetMaxDEX();
|
||||
inline virtual int32 GetMaxAGI();
|
||||
inline virtual int32 GetMaxINT();
|
||||
inline virtual int32 GetMaxWIS();
|
||||
inline virtual int32 GetMaxCHA();
|
||||
inline virtual int32 GetMaxMR();
|
||||
inline virtual int32 GetMaxPR();
|
||||
inline virtual int32 GetMaxDR();
|
||||
inline virtual int32 GetMaxCR();
|
||||
inline virtual int32 GetMaxFR();
|
||||
inline virtual int32 GetMaxCorrup();
|
||||
int32 CalcATK();
|
||||
int32 CalcSTR();
|
||||
int32 CalcSTA();
|
||||
int32 CalcDEX();
|
||||
int32 CalcAGI();
|
||||
int32 CalcINT();
|
||||
int32 CalcWIS();
|
||||
int32 CalcCHA();
|
||||
int32 CalcMR();
|
||||
int32 CalcFR();
|
||||
int32 CalcDR();
|
||||
int32 CalcPR();
|
||||
int32 CalcCR();
|
||||
int32 CalcCorrup();
|
||||
int32 CalcHPRegenCap();
|
||||
int32 CalcManaRegenCap();
|
||||
int32 LevelRegen();
|
||||
@ -466,56 +466,56 @@ public:
|
||||
uint32 GetHealRotationTimer () { return _healRotationTimer; }
|
||||
bool GetBardUseOutOfCombatSongs() { return _bardUseOutOfCombatSongs;}
|
||||
inline virtual int32 GetAC() const { return AC; }
|
||||
inline virtual int16 GetSTR() const { return STR; }
|
||||
inline virtual int16 GetSTA() const { return STA; }
|
||||
inline virtual int16 GetDEX() const { return DEX; }
|
||||
inline virtual int16 GetAGI() const { return AGI; }
|
||||
inline virtual int16 GetINT() const { return INT; }
|
||||
inline virtual int16 GetWIS() const { return WIS; }
|
||||
inline virtual int16 GetCHA() const { return CHA; }
|
||||
inline virtual int16 GetMR() const { return MR; }
|
||||
inline virtual int16 GetFR() const { return FR; }
|
||||
inline virtual int16 GetDR() const { return DR; }
|
||||
inline virtual int16 GetPR() const { return PR; }
|
||||
inline virtual int16 GetCR() const { return CR; }
|
||||
inline virtual int16 GetCorrup() const { return Corrup; }
|
||||
inline virtual int32 GetSTR() const { return STR; }
|
||||
inline virtual int32 GetSTA() const { return STA; }
|
||||
inline virtual int32 GetDEX() const { return DEX; }
|
||||
inline virtual int32 GetAGI() const { return AGI; }
|
||||
inline virtual int32 GetINT() const { return INT; }
|
||||
inline virtual int32 GetWIS() const { return WIS; }
|
||||
inline virtual int32 GetCHA() const { return CHA; }
|
||||
inline virtual int32 GetMR() const { return MR; }
|
||||
inline virtual int32 GetFR() const { return FR; }
|
||||
inline virtual int32 GetDR() const { return DR; }
|
||||
inline virtual int32 GetPR() const { return PR; }
|
||||
inline virtual int32 GetCR() const { return CR; }
|
||||
inline virtual int32 GetCorrup() const { return Corrup; }
|
||||
//Heroic
|
||||
inline virtual int16 GetHeroicSTR() const { return itembonuses.HeroicSTR; }
|
||||
inline virtual int16 GetHeroicSTA() const { return itembonuses.HeroicSTA; }
|
||||
inline virtual int16 GetHeroicDEX() const { return itembonuses.HeroicDEX; }
|
||||
inline virtual int16 GetHeroicAGI() const { return itembonuses.HeroicAGI; }
|
||||
inline virtual int16 GetHeroicINT() const { return itembonuses.HeroicINT; }
|
||||
inline virtual int16 GetHeroicWIS() const { return itembonuses.HeroicWIS; }
|
||||
inline virtual int16 GetHeroicCHA() const { return itembonuses.HeroicCHA; }
|
||||
inline virtual int16 GetHeroicMR() const { return itembonuses.HeroicMR; }
|
||||
inline virtual int16 GetHeroicFR() const { return itembonuses.HeroicFR; }
|
||||
inline virtual int16 GetHeroicDR() const { return itembonuses.HeroicDR; }
|
||||
inline virtual int16 GetHeroicPR() const { return itembonuses.HeroicPR; }
|
||||
inline virtual int16 GetHeroicCR() const { return itembonuses.HeroicCR; }
|
||||
inline virtual int16 GetHeroicCorrup() const { return itembonuses.HeroicCorrup; }
|
||||
inline virtual int32 GetHeroicSTR() const { return itembonuses.HeroicSTR; }
|
||||
inline virtual int32 GetHeroicSTA() const { return itembonuses.HeroicSTA; }
|
||||
inline virtual int32 GetHeroicDEX() const { return itembonuses.HeroicDEX; }
|
||||
inline virtual int32 GetHeroicAGI() const { return itembonuses.HeroicAGI; }
|
||||
inline virtual int32 GetHeroicINT() const { return itembonuses.HeroicINT; }
|
||||
inline virtual int32 GetHeroicWIS() const { return itembonuses.HeroicWIS; }
|
||||
inline virtual int32 GetHeroicCHA() const { return itembonuses.HeroicCHA; }
|
||||
inline virtual int32 GetHeroicMR() const { return itembonuses.HeroicMR; }
|
||||
inline virtual int32 GetHeroicFR() const { return itembonuses.HeroicFR; }
|
||||
inline virtual int32 GetHeroicDR() const { return itembonuses.HeroicDR; }
|
||||
inline virtual int32 GetHeroicPR() const { return itembonuses.HeroicPR; }
|
||||
inline virtual int32 GetHeroicCR() const { return itembonuses.HeroicCR; }
|
||||
inline virtual int32 GetHeroicCorrup() const { return itembonuses.HeroicCorrup; }
|
||||
// Mod2
|
||||
inline virtual int16 GetShielding() const { return itembonuses.MeleeMitigation; }
|
||||
inline virtual int16 GetSpellShield() const { return itembonuses.SpellShield; }
|
||||
inline virtual int16 GetDoTShield() const { return itembonuses.DoTShielding; }
|
||||
inline virtual int16 GetStunResist() const { return itembonuses.StunResist; }
|
||||
inline virtual int16 GetStrikeThrough() const { return itembonuses.StrikeThrough; }
|
||||
inline virtual int16 GetAvoidance() const { return itembonuses.AvoidMeleeChance; }
|
||||
inline virtual int16 GetAccuracy() const { return itembonuses.HitChance; }
|
||||
inline virtual int16 GetCombatEffects() const { return itembonuses.ProcChance; }
|
||||
inline virtual int16 GetDS() const { return itembonuses.DamageShield; }
|
||||
inline virtual int32 GetShielding() const { return itembonuses.MeleeMitigation; }
|
||||
inline virtual int32 GetSpellShield() const { return itembonuses.SpellShield; }
|
||||
inline virtual int32 GetDoTShield() const { return itembonuses.DoTShielding; }
|
||||
inline virtual int32 GetStunResist() const { return itembonuses.StunResist; }
|
||||
inline virtual int32 GetStrikeThrough() const { return itembonuses.StrikeThrough; }
|
||||
inline virtual int32 GetAvoidance() const { return itembonuses.AvoidMeleeChance; }
|
||||
inline virtual int32 GetAccuracy() const { return itembonuses.HitChance; }
|
||||
inline virtual int32 GetCombatEffects() const { return itembonuses.ProcChance; }
|
||||
inline virtual int32 GetDS() const { return itembonuses.DamageShield; }
|
||||
// Mod3
|
||||
inline virtual int16 GetHealAmt() const { return itembonuses.HealAmt; }
|
||||
inline virtual int16 GetSpellDmg() const { return itembonuses.SpellDmg; }
|
||||
inline virtual int16 GetClair() const { return itembonuses.Clairvoyance; }
|
||||
inline virtual int16 GetDSMit() const { return itembonuses.DSMitigation; }
|
||||
inline virtual int32 GetHealAmt() const { return itembonuses.HealAmt; }
|
||||
inline virtual int32 GetSpellDmg() const { return itembonuses.SpellDmg; }
|
||||
inline virtual int32 GetClair() const { return itembonuses.Clairvoyance; }
|
||||
inline virtual int32 GetDSMit() const { return itembonuses.DSMitigation; }
|
||||
|
||||
inline virtual int16 GetSingMod() const { return itembonuses.singingMod; }
|
||||
inline virtual int16 GetBrassMod() const { return itembonuses.brassMod; }
|
||||
inline virtual int16 GetPercMod() const { return itembonuses.percussionMod; }
|
||||
inline virtual int16 GetStringMod() const { return itembonuses.stringedMod; }
|
||||
inline virtual int16 GetWindMod() const { return itembonuses.windMod; }
|
||||
inline virtual int32 GetSingMod() const { return itembonuses.singingMod; }
|
||||
inline virtual int32 GetBrassMod() const { return itembonuses.brassMod; }
|
||||
inline virtual int32 GetPercMod() const { return itembonuses.percussionMod; }
|
||||
inline virtual int32 GetStringMod() const { return itembonuses.stringedMod; }
|
||||
inline virtual int32 GetWindMod() const { return itembonuses.windMod; }
|
||||
|
||||
inline virtual int16 GetDelayDeath() const { return aabonuses.DelayDeath + spellbonuses.DelayDeath + itembonuses.DelayDeath; }
|
||||
inline virtual int32 GetDelayDeath() const { return aabonuses.DelayDeath + spellbonuses.DelayDeath + itembonuses.DelayDeath; }
|
||||
|
||||
inline InspectMessage_Struct& GetInspectMessage() { return _botInspectMessage; }
|
||||
inline const InspectMessage_Struct& GetInspectMessage() const { return _botInspectMessage; }
|
||||
@ -556,13 +556,13 @@ public:
|
||||
|
||||
protected:
|
||||
virtual void PetAIProcess();
|
||||
static NPCType FillNPCTypeStruct(uint32 botSpellsID, std::string botName, std::string botLastName, uint8 botLevel, uint16 botRace, uint8 botClass, uint8 gender, float size, uint32 face, uint32 hairStyle, uint32 hairColor, uint32 eyeColor, uint32 eyeColor2, uint32 beardColor, uint32 beard, uint32 drakkinHeritage, uint32 drakkinTattoo, uint32 drakkinDetails, int32 hp, int32 mana, int16 mr, int16 cr, int16 dr, int16 fr, int16 pr, int16 corrup, int16 ac, uint16 str, uint16 sta, uint16 dex, uint16 agi, uint16 _int, uint16 wis, uint16 cha, uint16 attack);
|
||||
static NPCType FillNPCTypeStruct(uint32 botSpellsID, std::string botName, std::string botLastName, uint8 botLevel, uint16 botRace, uint8 botClass, uint8 gender, float size, uint32 face, uint32 hairStyle, uint32 hairColor, uint32 eyeColor, uint32 eyeColor2, uint32 beardColor, uint32 beard, uint32 drakkinHeritage, uint32 drakkinTattoo, uint32 drakkinDetails, int32 hp, int32 mana, int32 mr, int32 cr, int32 dr, int32 fr, int32 pr, int32 corrup, int32 ac, uint32 str, uint32 sta, uint32 dex, uint32 agi, uint32 _int, uint32 wis, uint32 cha, uint32 attack);
|
||||
virtual void BotMeditate(bool isSitting);
|
||||
virtual void BotRangedAttack(Mob* other);
|
||||
virtual bool CheckBotDoubleAttack(bool Triple = false);
|
||||
virtual int16 GetBotFocusEffect(BotfocusType bottype, uint16 spell_id);
|
||||
virtual int16 CalcBotFocusEffect(BotfocusType bottype, uint16 focus_id, uint16 spell_id, bool best_focus=false);
|
||||
virtual int16 CalcBotAAFocus(BotfocusType type, uint32 aa_ID, uint16 spell_id);
|
||||
virtual int32 GetBotFocusEffect(BotfocusType bottype, uint16 spell_id);
|
||||
virtual int32 CalcBotFocusEffect(BotfocusType bottype, uint16 focus_id, uint16 spell_id, bool best_focus=false);
|
||||
virtual int32 CalcBotAAFocus(BotfocusType type, uint32 aa_ID, uint16 spell_id);
|
||||
virtual void PerformTradeWithClient(int16 beginSlotID, int16 endSlotID, Client* client);
|
||||
virtual bool AIDoSpellCast(uint8 i, Mob* tar, int32 mana_cost, uint32* oDontDoAgainBefore = 0);
|
||||
virtual float GetMaxMeleeRangeToTarget(Mob* target);
|
||||
@ -601,7 +601,7 @@ private:
|
||||
int32 base_end;
|
||||
int32 cur_end;
|
||||
int32 max_end;
|
||||
int16 end_regen;
|
||||
int32 end_regen;
|
||||
uint32 timers[MaxTimer];
|
||||
bool _hasBeenSummoned;
|
||||
float _preSummonX;
|
||||
@ -626,26 +626,26 @@ private:
|
||||
bool _bardUseOutOfCombatSongs;
|
||||
|
||||
// Private "base stats" Members
|
||||
int16 _baseMR;
|
||||
int16 _baseCR;
|
||||
int16 _baseDR;
|
||||
int16 _baseFR;
|
||||
int16 _basePR;
|
||||
int16 _baseCorrup;
|
||||
int _baseAC;
|
||||
int16 _baseSTR;
|
||||
int16 _baseSTA;
|
||||
int16 _baseDEX;
|
||||
int16 _baseAGI;
|
||||
int16 _baseINT;
|
||||
int16 _baseWIS;
|
||||
int16 _baseCHA;
|
||||
int16 _baseATK;
|
||||
int32 _baseMR;
|
||||
int32 _baseCR;
|
||||
int32 _baseDR;
|
||||
int32 _baseFR;
|
||||
int32 _basePR;
|
||||
int32 _baseCorrup;
|
||||
int32 _baseAC;
|
||||
int32 _baseSTR;
|
||||
int32 _baseSTA;
|
||||
int32 _baseDEX;
|
||||
int32 _baseAGI;
|
||||
int32 _baseINT;
|
||||
int32 _baseWIS;
|
||||
int32 _baseCHA;
|
||||
int32 _baseATK;
|
||||
uint16 _baseRace; // Necessary to preserve the race otherwise bots get their race updated in the db when they get an illusion.
|
||||
uint8 _baseGender; // Bots gender. Necessary to preserve the original value otherwise it can be changed by illusions.
|
||||
|
||||
// Class Methods
|
||||
int16 acmod();
|
||||
int32 acmod();
|
||||
void GenerateBaseStats();
|
||||
void GenerateAppearance();
|
||||
void GenerateArmorClass();
|
||||
@ -670,8 +670,8 @@ private:
|
||||
void SavePetBuffs(SpellBuff_Struct* petBuffs, uint32 botPetSaveId);
|
||||
void LoadPetItems(uint32* petItems, uint32 botPetSaveId);
|
||||
void SavePetItems(uint32* petItems, uint32 botPetSaveId);
|
||||
void LoadPetStats(std::string* petName, uint16* petMana, uint16* petHitPoints, uint32* botPetId, uint32 botPetSaveId);
|
||||
uint32 SavePetStats(std::string petName, uint16 petMana, uint16 petHitPoints, uint32 botPetId);
|
||||
void LoadPetStats(std::string* petName, uint32* petMana, uint32* petHitPoints, uint32* botPetId, uint32 botPetSaveId);
|
||||
uint32 SavePetStats(std::string petName, uint32 petMana, uint32 petHitPoints, uint32 botPetId);
|
||||
void LoadPet(); // Load and spawn bot pet if there is one
|
||||
void SavePet(); // Save and depop bot pet if there is one
|
||||
uint32 GetPetSaveId();
|
||||
|
||||
@ -2312,7 +2312,7 @@ bool Client::CheckIncreaseSkill(SkillUseTypes skillid, Mob *against_who, int cha
|
||||
if (skillval < maxskill)
|
||||
{
|
||||
// the higher your current skill level, the harder it is
|
||||
int16 Chance = 10 + chancemodi + ((252 - skillval) / 20);
|
||||
int32 Chance = 10 + chancemodi + ((252 - skillval) / 20);
|
||||
|
||||
Chance = (Chance * RuleI(Character, SkillUpModifier) / 100);
|
||||
|
||||
@ -2346,7 +2346,7 @@ void Client::CheckLanguageSkillIncrease(uint8 langid, uint8 TeacherSkill) {
|
||||
int LangSkill = m_pp.languages[langid]; // get current language skill
|
||||
|
||||
if (LangSkill < 100) { // if the language isn't already maxed
|
||||
int16 Chance = 5 + ((TeacherSkill - LangSkill)/10); // greater chance to learn if teacher's skill is much higher than yours
|
||||
int32 Chance = 5 + ((TeacherSkill - LangSkill)/10); // greater chance to learn if teacher's skill is much higher than yours
|
||||
Chance = (Chance * RuleI(Character, SkillUpModifier)/100);
|
||||
|
||||
if(MakeRandomFloat(0,100) < Chance) { // if they make the roll
|
||||
@ -4163,10 +4163,10 @@ uint16 Client::GetPrimarySkillValue()
|
||||
return GetSkill(skill);
|
||||
}
|
||||
|
||||
uint16 Client::GetTotalATK()
|
||||
uint32 Client::GetTotalATK()
|
||||
{
|
||||
uint16 AttackRating = 0;
|
||||
uint16 WornCap = itembonuses.ATK;
|
||||
uint32 AttackRating = 0;
|
||||
uint32 WornCap = itembonuses.ATK;
|
||||
|
||||
if(IsClient()) {
|
||||
AttackRating = ((WornCap * 1.342) + (GetSkill(SkillOffense) * 1.345) + ((GetSTR() - 66) * 0.9) + (GetPrimarySkillValue() * 2.69));
|
||||
@ -4183,9 +4183,9 @@ uint16 Client::GetTotalATK()
|
||||
return AttackRating;
|
||||
}
|
||||
|
||||
uint16 Client::GetATKRating()
|
||||
uint32 Client::GetATKRating()
|
||||
{
|
||||
uint16 AttackRating = 0;
|
||||
uint32 AttackRating = 0;
|
||||
if(IsClient()) {
|
||||
AttackRating = (GetSkill(SkillOffense) * 1.345) + ((GetSTR() - 66) * 0.9) + (GetPrimarySkillValue() * 2.69);
|
||||
|
||||
@ -8087,9 +8087,9 @@ void Client::Consume(const Item_Struct *item, uint8 type, int16 slot, bool auto_
|
||||
{
|
||||
if(!item) { return; }
|
||||
|
||||
uint16 cons_mod = 180;
|
||||
uint32 cons_mod = 180;
|
||||
|
||||
int16 metabolism_bonus = spellbonuses.Metabolism + itembonuses.Metabolism + aabonuses.Metabolism;
|
||||
int32 metabolism_bonus = spellbonuses.Metabolism + itembonuses.Metabolism + aabonuses.Metabolism;
|
||||
|
||||
if (metabolism_bonus)
|
||||
cons_mod = cons_mod * metabolism_bonus * RuleI(Character, ConsumptionMultiplier) / 10000;
|
||||
|
||||
180
zone/client.h
180
zone/client.h
@ -409,35 +409,35 @@ public:
|
||||
inline virtual int GetHaste() const { return Haste; }
|
||||
int GetRawACNoShield(int &shield_ac) const;
|
||||
|
||||
inline virtual int16 GetSTR() const { return STR; }
|
||||
inline virtual int16 GetSTA() const { return STA; }
|
||||
inline virtual int16 GetDEX() const { return DEX; }
|
||||
inline virtual int16 GetAGI() const { return AGI; }
|
||||
inline virtual int16 GetINT() const { return INT; }
|
||||
inline virtual int16 GetWIS() const { return WIS; }
|
||||
inline virtual int16 GetCHA() const { return CHA; }
|
||||
inline virtual int16 GetMR() const { return MR; }
|
||||
inline virtual int16 GetFR() const { return FR; }
|
||||
inline virtual int16 GetDR() const { return DR; }
|
||||
inline virtual int16 GetPR() const { return PR; }
|
||||
inline virtual int16 GetCR() const { return CR; }
|
||||
inline virtual int16 GetCorrup() const { return Corrup; }
|
||||
inline virtual int32 GetSTR() const { return STR; }
|
||||
inline virtual int32 GetSTA() const { return STA; }
|
||||
inline virtual int32 GetDEX() const { return DEX; }
|
||||
inline virtual int32 GetAGI() const { return AGI; }
|
||||
inline virtual int32 GetINT() const { return INT; }
|
||||
inline virtual int32 GetWIS() const { return WIS; }
|
||||
inline virtual int32 GetCHA() const { return CHA; }
|
||||
inline virtual int32 GetMR() const { return MR; }
|
||||
inline virtual int32 GetFR() const { return FR; }
|
||||
inline virtual int32 GetDR() const { return DR; }
|
||||
inline virtual int32 GetPR() const { return PR; }
|
||||
inline virtual int32 GetCR() const { return CR; }
|
||||
inline virtual int32 GetCorrup() const { return Corrup; }
|
||||
|
||||
int16 GetMaxStat() const;
|
||||
int16 GetMaxResist() const;
|
||||
int16 GetMaxSTR() const;
|
||||
int16 GetMaxSTA() const;
|
||||
int16 GetMaxDEX() const;
|
||||
int16 GetMaxAGI() const;
|
||||
int16 GetMaxINT() const;
|
||||
int16 GetMaxWIS() const;
|
||||
int16 GetMaxCHA() const;
|
||||
int16 GetMaxMR() const;
|
||||
int16 GetMaxPR() const;
|
||||
int16 GetMaxDR() const;
|
||||
int16 GetMaxCR() const;
|
||||
int16 GetMaxFR() const;
|
||||
int16 GetMaxCorrup() const;
|
||||
int32 GetMaxStat() const;
|
||||
int32 GetMaxResist() const;
|
||||
int32 GetMaxSTR() const;
|
||||
int32 GetMaxSTA() const;
|
||||
int32 GetMaxDEX() const;
|
||||
int32 GetMaxAGI() const;
|
||||
int32 GetMaxINT() const;
|
||||
int32 GetMaxWIS() const;
|
||||
int32 GetMaxCHA() const;
|
||||
int32 GetMaxMR() const;
|
||||
int32 GetMaxPR() const;
|
||||
int32 GetMaxDR() const;
|
||||
int32 GetMaxCR() const;
|
||||
int32 GetMaxFR() const;
|
||||
int32 GetMaxCorrup() const;
|
||||
inline uint8 GetBaseSTR() const { return m_pp.STR; }
|
||||
inline uint8 GetBaseSTA() const { return m_pp.STA; }
|
||||
inline uint8 GetBaseCHA() const { return m_pp.CHA; }
|
||||
@ -447,42 +447,42 @@ public:
|
||||
inline uint8 GetBaseWIS() const { return m_pp.WIS; }
|
||||
inline uint8 GetBaseCorrup() const { return 15; } // Same for all
|
||||
|
||||
inline virtual int16 GetHeroicSTR() const { return itembonuses.HeroicSTR; }
|
||||
inline virtual int16 GetHeroicSTA() const { return itembonuses.HeroicSTA; }
|
||||
inline virtual int16 GetHeroicDEX() const { return itembonuses.HeroicDEX; }
|
||||
inline virtual int16 GetHeroicAGI() const { return itembonuses.HeroicAGI; }
|
||||
inline virtual int16 GetHeroicINT() const { return itembonuses.HeroicINT; }
|
||||
inline virtual int16 GetHeroicWIS() const { return itembonuses.HeroicWIS; }
|
||||
inline virtual int16 GetHeroicCHA() const { return itembonuses.HeroicCHA; }
|
||||
inline virtual int16 GetHeroicMR() const { return itembonuses.HeroicMR; }
|
||||
inline virtual int16 GetHeroicFR() const { return itembonuses.HeroicFR; }
|
||||
inline virtual int16 GetHeroicDR() const { return itembonuses.HeroicDR; }
|
||||
inline virtual int16 GetHeroicPR() const { return itembonuses.HeroicPR; }
|
||||
inline virtual int16 GetHeroicCR() const { return itembonuses.HeroicCR; }
|
||||
inline virtual int16 GetHeroicCorrup() const { return itembonuses.HeroicCorrup; }
|
||||
inline virtual int32 GetHeroicSTR() const { return itembonuses.HeroicSTR; }
|
||||
inline virtual int32 GetHeroicSTA() const { return itembonuses.HeroicSTA; }
|
||||
inline virtual int32 GetHeroicDEX() const { return itembonuses.HeroicDEX; }
|
||||
inline virtual int32 GetHeroicAGI() const { return itembonuses.HeroicAGI; }
|
||||
inline virtual int32 GetHeroicINT() const { return itembonuses.HeroicINT; }
|
||||
inline virtual int32 GetHeroicWIS() const { return itembonuses.HeroicWIS; }
|
||||
inline virtual int32 GetHeroicCHA() const { return itembonuses.HeroicCHA; }
|
||||
inline virtual int32 GetHeroicMR() const { return itembonuses.HeroicMR; }
|
||||
inline virtual int32 GetHeroicFR() const { return itembonuses.HeroicFR; }
|
||||
inline virtual int32 GetHeroicDR() const { return itembonuses.HeroicDR; }
|
||||
inline virtual int32 GetHeroicPR() const { return itembonuses.HeroicPR; }
|
||||
inline virtual int32 GetHeroicCR() const { return itembonuses.HeroicCR; }
|
||||
inline virtual int32 GetHeroicCorrup() const { return itembonuses.HeroicCorrup; }
|
||||
// Mod2
|
||||
inline virtual int16 GetShielding() const { return itembonuses.MeleeMitigation; }
|
||||
inline virtual int16 GetSpellShield() const { return itembonuses.SpellShield; }
|
||||
inline virtual int16 GetDoTShield() const { return itembonuses.DoTShielding; }
|
||||
inline virtual int16 GetStunResist() const { return itembonuses.StunResist; }
|
||||
inline virtual int16 GetStrikeThrough() const { return itembonuses.StrikeThrough; }
|
||||
inline virtual int16 GetAvoidance() const { return itembonuses.AvoidMeleeChance; }
|
||||
inline virtual int16 GetAccuracy() const { return itembonuses.HitChance; }
|
||||
inline virtual int16 GetCombatEffects() const { return itembonuses.ProcChance; }
|
||||
inline virtual int16 GetDS() const { return itembonuses.DamageShield; }
|
||||
inline virtual int32 GetShielding() const { return itembonuses.MeleeMitigation; }
|
||||
inline virtual int32 GetSpellShield() const { return itembonuses.SpellShield; }
|
||||
inline virtual int32 GetDoTShield() const { return itembonuses.DoTShielding; }
|
||||
inline virtual int32 GetStunResist() const { return itembonuses.StunResist; }
|
||||
inline virtual int32 GetStrikeThrough() const { return itembonuses.StrikeThrough; }
|
||||
inline virtual int32 GetAvoidance() const { return itembonuses.AvoidMeleeChance; }
|
||||
inline virtual int32 GetAccuracy() const { return itembonuses.HitChance; }
|
||||
inline virtual int32 GetCombatEffects() const { return itembonuses.ProcChance; }
|
||||
inline virtual int32 GetDS() const { return itembonuses.DamageShield; }
|
||||
// Mod3
|
||||
inline virtual int16 GetHealAmt() const { return itembonuses.HealAmt; }
|
||||
inline virtual int16 GetSpellDmg() const { return itembonuses.SpellDmg; }
|
||||
inline virtual int16 GetClair() const { return itembonuses.Clairvoyance; }
|
||||
inline virtual int16 GetDSMit() const { return itembonuses.DSMitigation; }
|
||||
inline virtual int32 GetHealAmt() const { return itembonuses.HealAmt; }
|
||||
inline virtual int32 GetSpellDmg() const { return itembonuses.SpellDmg; }
|
||||
inline virtual int32 GetClair() const { return itembonuses.Clairvoyance; }
|
||||
inline virtual int32 GetDSMit() const { return itembonuses.DSMitigation; }
|
||||
|
||||
inline virtual int16 GetSingMod() const { return itembonuses.singingMod; }
|
||||
inline virtual int16 GetBrassMod() const { return itembonuses.brassMod; }
|
||||
inline virtual int16 GetPercMod() const { return itembonuses.percussionMod; }
|
||||
inline virtual int16 GetStringMod() const { return itembonuses.stringedMod; }
|
||||
inline virtual int16 GetWindMod() const { return itembonuses.windMod; }
|
||||
inline virtual int32 GetSingMod() const { return itembonuses.singingMod; }
|
||||
inline virtual int32 GetBrassMod() const { return itembonuses.brassMod; }
|
||||
inline virtual int32 GetPercMod() const { return itembonuses.percussionMod; }
|
||||
inline virtual int32 GetStringMod() const { return itembonuses.stringedMod; }
|
||||
inline virtual int32 GetWindMod() const { return itembonuses.windMod; }
|
||||
|
||||
inline virtual int16 GetDelayDeath() const { return aabonuses.DelayDeath + spellbonuses.DelayDeath + itembonuses.DelayDeath + 11; }
|
||||
inline virtual int32 GetDelayDeath() const { return aabonuses.DelayDeath + spellbonuses.DelayDeath + itembonuses.DelayDeath + 11; }
|
||||
|
||||
float GetActSpellRange(uint16 spell_id, float range, bool IsBard = false);
|
||||
int32 GetActSpellDamage(uint16 spell_id, int32 value, Mob* target = nullptr);
|
||||
@ -529,8 +529,8 @@ public:
|
||||
void DoEnduranceUpkeep(); //does the endurance upkeep
|
||||
|
||||
//This calculates total Attack Rating to match very close to what the client should show
|
||||
uint16 GetTotalATK();
|
||||
uint16 GetATKRating();
|
||||
uint32 GetTotalATK();
|
||||
uint32 GetATKRating();
|
||||
//This gets the skill value of the item type equiped in the Primary Slot
|
||||
uint16 GetPrimarySkillValue();
|
||||
|
||||
@ -606,7 +606,7 @@ public:
|
||||
|
||||
void SetFactionLevel(uint32 char_id, uint32 npc_id, uint8 char_class, uint8 char_race, uint8 char_deity);
|
||||
void SetFactionLevel2(uint32 char_id, int32 faction_id, uint8 char_class, uint8 char_race, uint8 char_deity, int32 value, uint8 temp);
|
||||
int16 GetRawItemAC();
|
||||
int32 GetRawItemAC();
|
||||
uint16 GetCombinedAC_TEST();
|
||||
|
||||
inline uint32 LSAccountID() const { return lsaccountid; }
|
||||
@ -787,7 +787,7 @@ public:
|
||||
int32 GetAAEffectid(uint32 aa_ID, uint32 slot_id) { return GetAAEffectDataBySlot(aa_ID, slot_id, true, false,false); }
|
||||
int32 GetAABase1(uint32 aa_ID, uint32 slot_id) { return GetAAEffectDataBySlot(aa_ID, slot_id, false, true,false); }
|
||||
int32 GetAABase2(uint32 aa_ID, uint32 slot_id) { return GetAAEffectDataBySlot(aa_ID, slot_id, false, false,true); }
|
||||
int16 acmod();
|
||||
int32 acmod();
|
||||
|
||||
// Item methods
|
||||
void EVENT_ITEM_ScriptStopReturn();
|
||||
@ -1172,13 +1172,13 @@ public:
|
||||
void TryItemTimer(int slot);
|
||||
void SendItemScale(ItemInst *inst);
|
||||
|
||||
int16 GetActSTR() { return( std::min(GetMaxSTR(), GetSTR()) ); }
|
||||
int16 GetActSTA() { return( std::min(GetMaxSTA(), GetSTA()) ); }
|
||||
int16 GetActDEX() { return( std::min(GetMaxDEX(), GetDEX()) ); }
|
||||
int16 GetActAGI() { return( std::min(GetMaxAGI(), GetAGI()) ); }
|
||||
int16 GetActINT() { return( std::min(GetMaxINT(), GetINT()) ); }
|
||||
int16 GetActWIS() { return( std::min(GetMaxWIS(), GetWIS()) ); }
|
||||
int16 GetActCHA() { return( std::min(GetMaxCHA(), GetCHA()) ); }
|
||||
int32 GetActSTR() { return( std::min(GetMaxSTR(), GetSTR()) ); }
|
||||
int32 GetActSTA() { return( std::min(GetMaxSTA(), GetSTA()) ); }
|
||||
int32 GetActDEX() { return( std::min(GetMaxDEX(), GetDEX()) ); }
|
||||
int32 GetActAGI() { return( std::min(GetMaxAGI(), GetAGI()) ); }
|
||||
int32 GetActINT() { return( std::min(GetMaxINT(), GetINT()) ); }
|
||||
int32 GetActWIS() { return( std::min(GetMaxWIS(), GetWIS()) ); }
|
||||
int32 GetActCHA() { return( std::min(GetMaxCHA(), GetCHA()) ); }
|
||||
void LoadAccountFlags();
|
||||
void SetAccountFlag(std::string flag, std::string val);
|
||||
std::string GetAccountFlag(std::string flag); float GetDamageMultiplier(SkillUseTypes);
|
||||
@ -1276,27 +1276,27 @@ private:
|
||||
|
||||
void HandleTraderPriceUpdate(const EQApplicationPacket *app);
|
||||
|
||||
int16 CalcAC();
|
||||
int16 GetACMit();
|
||||
int16 GetACAvoid();
|
||||
int16 CalcATK();
|
||||
int CalcHaste();
|
||||
int32 CalcAC();
|
||||
int32 GetACMit();
|
||||
int32 GetACAvoid();
|
||||
int32 CalcATK();
|
||||
int32 CalcHaste();
|
||||
|
||||
int16 CalcAlcoholPhysicalEffect();
|
||||
int16 CalcSTR();
|
||||
int16 CalcSTA();
|
||||
int16 CalcDEX();
|
||||
int16 CalcAGI();
|
||||
int16 CalcINT();
|
||||
int16 CalcWIS();
|
||||
int16 CalcCHA();
|
||||
int32 CalcAlcoholPhysicalEffect();
|
||||
int32 CalcSTR();
|
||||
int32 CalcSTA();
|
||||
int32 CalcDEX();
|
||||
int32 CalcAGI();
|
||||
int32 CalcINT();
|
||||
int32 CalcWIS();
|
||||
int32 CalcCHA();
|
||||
|
||||
int16 CalcMR();
|
||||
int16 CalcFR();
|
||||
int16 CalcDR();
|
||||
int16 CalcPR();
|
||||
int16 CalcCR();
|
||||
int16 CalcCorrup();
|
||||
int32 CalcMR();
|
||||
int32 CalcFR();
|
||||
int32 CalcDR();
|
||||
int32 CalcPR();
|
||||
int32 CalcCR();
|
||||
int32 CalcCorrup();
|
||||
int32 CalcMaxHP();
|
||||
int32 CalcBaseHP();
|
||||
int32 CalcHPRegen();
|
||||
|
||||
@ -35,14 +35,14 @@
|
||||
|
||||
|
||||
// Return max stat value for level
|
||||
int16 Client::GetMaxStat() const {
|
||||
int32 Client::GetMaxStat() const {
|
||||
|
||||
if((RuleI(Character, StatCap)) > 0)
|
||||
return (RuleI(Character, StatCap));
|
||||
|
||||
int level = GetLevel();
|
||||
|
||||
int16 base = 0;
|
||||
int32 base = 0;
|
||||
|
||||
if (level < 61) {
|
||||
base = 255;
|
||||
@ -60,11 +60,11 @@ int16 Client::GetMaxStat() const {
|
||||
return(base);
|
||||
}
|
||||
|
||||
int16 Client::GetMaxResist() const
|
||||
int32 Client::GetMaxResist() const
|
||||
{
|
||||
int level = GetLevel();
|
||||
|
||||
int16 base = 500;
|
||||
int32 base = 500;
|
||||
|
||||
if(level > 60)
|
||||
base += ((level - 60) * 5);
|
||||
@ -72,79 +72,79 @@ int16 Client::GetMaxResist() const
|
||||
return base;
|
||||
}
|
||||
|
||||
int16 Client::GetMaxSTR() const {
|
||||
int32 Client::GetMaxSTR() const {
|
||||
return GetMaxStat()
|
||||
+ itembonuses.STRCapMod
|
||||
+ spellbonuses.STRCapMod
|
||||
+ aabonuses.STRCapMod;
|
||||
}
|
||||
int16 Client::GetMaxSTA() const {
|
||||
int32 Client::GetMaxSTA() const {
|
||||
return GetMaxStat()
|
||||
+ itembonuses.STACapMod
|
||||
+ spellbonuses.STACapMod
|
||||
+ aabonuses.STACapMod;
|
||||
}
|
||||
int16 Client::GetMaxDEX() const {
|
||||
int32 Client::GetMaxDEX() const {
|
||||
return GetMaxStat()
|
||||
+ itembonuses.DEXCapMod
|
||||
+ spellbonuses.DEXCapMod
|
||||
+ aabonuses.DEXCapMod;
|
||||
}
|
||||
int16 Client::GetMaxAGI() const {
|
||||
int32 Client::GetMaxAGI() const {
|
||||
return GetMaxStat()
|
||||
+ itembonuses.AGICapMod
|
||||
+ spellbonuses.AGICapMod
|
||||
+ aabonuses.AGICapMod;
|
||||
}
|
||||
int16 Client::GetMaxINT() const {
|
||||
int32 Client::GetMaxINT() const {
|
||||
return GetMaxStat()
|
||||
+ itembonuses.INTCapMod
|
||||
+ spellbonuses.INTCapMod
|
||||
+ aabonuses.INTCapMod;
|
||||
}
|
||||
int16 Client::GetMaxWIS() const {
|
||||
int32 Client::GetMaxWIS() const {
|
||||
return GetMaxStat()
|
||||
+ itembonuses.WISCapMod
|
||||
+ spellbonuses.WISCapMod
|
||||
+ aabonuses.WISCapMod;
|
||||
}
|
||||
int16 Client::GetMaxCHA() const {
|
||||
int32 Client::GetMaxCHA() const {
|
||||
return GetMaxStat()
|
||||
+ itembonuses.CHACapMod
|
||||
+ spellbonuses.CHACapMod
|
||||
+ aabonuses.CHACapMod;
|
||||
}
|
||||
int16 Client::GetMaxMR() const {
|
||||
int32 Client::GetMaxMR() const {
|
||||
return GetMaxResist()
|
||||
+ itembonuses.MRCapMod
|
||||
+ spellbonuses.MRCapMod
|
||||
+ aabonuses.MRCapMod;
|
||||
}
|
||||
int16 Client::GetMaxPR() const {
|
||||
int32 Client::GetMaxPR() const {
|
||||
return GetMaxResist()
|
||||
+ itembonuses.PRCapMod
|
||||
+ spellbonuses.PRCapMod
|
||||
+ aabonuses.PRCapMod;
|
||||
}
|
||||
int16 Client::GetMaxDR() const {
|
||||
int32 Client::GetMaxDR() const {
|
||||
return GetMaxResist()
|
||||
+ itembonuses.DRCapMod
|
||||
+ spellbonuses.DRCapMod
|
||||
+ aabonuses.DRCapMod;
|
||||
}
|
||||
int16 Client::GetMaxCR() const {
|
||||
int32 Client::GetMaxCR() const {
|
||||
return GetMaxResist()
|
||||
+ itembonuses.CRCapMod
|
||||
+ spellbonuses.CRCapMod
|
||||
+ aabonuses.CRCapMod;
|
||||
}
|
||||
int16 Client::GetMaxFR() const {
|
||||
int32 Client::GetMaxFR() const {
|
||||
return GetMaxResist()
|
||||
+ itembonuses.FRCapMod
|
||||
+ spellbonuses.FRCapMod
|
||||
+ aabonuses.FRCapMod;
|
||||
}
|
||||
int16 Client::GetMaxCorrup() const {
|
||||
int32 Client::GetMaxCorrup() const {
|
||||
return GetMaxResist()
|
||||
+ itembonuses.CorrupCapMod
|
||||
+ spellbonuses.CorrupCapMod
|
||||
@ -265,8 +265,8 @@ int32 Client::CalcMaxHP() {
|
||||
return max_hp;
|
||||
}
|
||||
|
||||
uint16 Mob::GetClassLevelFactor(){
|
||||
uint16 multiplier = 0;
|
||||
uint32 Mob::GetClassLevelFactor(){
|
||||
uint32 multiplier = 0;
|
||||
uint8 mlevel=GetLevel();
|
||||
switch(GetClass())
|
||||
{
|
||||
@ -386,8 +386,8 @@ int32 Client::CalcBaseHP()
|
||||
}
|
||||
}
|
||||
else {
|
||||
uint16 Post255;
|
||||
uint16 lm=GetClassLevelFactor();
|
||||
uint32 Post255;
|
||||
uint32 lm=GetClassLevelFactor();
|
||||
if((GetSTA()-255)/2 > 0)
|
||||
Post255 = (GetSTA()-255)/2;
|
||||
else
|
||||
@ -446,8 +446,8 @@ uint32 Client::GetClassHPFactor() {
|
||||
}
|
||||
|
||||
// This should return the combined AC of all the items the player is wearing.
|
||||
int16 Client::GetRawItemAC() {
|
||||
int16 Total = 0;
|
||||
int32 Client::GetRawItemAC() {
|
||||
int32 Total = 0;
|
||||
|
||||
// this skips MainAmmo..add an '=' conditional if that slot is required (original behavior)
|
||||
for (int16 slot_id = EmuConstants::EQUIPMENT_BEGIN; slot_id < EmuConstants::EQUIPMENT_END; slot_id++) {
|
||||
@ -460,7 +460,7 @@ int16 Client::GetRawItemAC() {
|
||||
return Total;
|
||||
}
|
||||
|
||||
int16 Client::acmod() {
|
||||
int32 Client::acmod() {
|
||||
int agility = GetAGI();
|
||||
int level = GetLevel();
|
||||
if(agility < 1 || level < 1)
|
||||
@ -838,7 +838,7 @@ int16 Client::acmod() {
|
||||
// ac1 and ac2 are probably the damage migitation and damage avoidance numbers, not sure which is which.
|
||||
// I forgot to include the iksar defense bonus and i cant find my notes now...
|
||||
// AC from spells are not included (cant even cast spells yet..)
|
||||
int16 Client::CalcAC() {
|
||||
int32 Client::CalcAC() {
|
||||
|
||||
// new formula
|
||||
int avoidance = (acmod() + ((GetSkill(SkillDefense) + itembonuses.HeroicAGI/10)*16)/9);
|
||||
@ -889,7 +889,7 @@ int16 Client::CalcAC() {
|
||||
return(AC);
|
||||
}
|
||||
|
||||
int16 Client::GetACMit() {
|
||||
int32 Client::GetACMit() {
|
||||
|
||||
int mitigation = 0;
|
||||
if (m_pp.class_ == WIZARD || m_pp.class_ == MAGICIAN || m_pp.class_ == NECROMANCER || m_pp.class_ == ENCHANTER) {
|
||||
@ -915,9 +915,9 @@ int16 Client::GetACMit() {
|
||||
return(mitigation*1000/847);
|
||||
}
|
||||
|
||||
int16 Client::GetACAvoid() {
|
||||
int32 Client::GetACAvoid() {
|
||||
|
||||
int avoidance = (acmod() + ((GetSkill(SkillDefense) + itembonuses.HeroicAGI/10)*16)/9);
|
||||
int32 avoidance = (acmod() + ((GetSkill(SkillDefense) + itembonuses.HeroicAGI/10)*16)/9);
|
||||
if (avoidance < 0)
|
||||
avoidance = 0;
|
||||
|
||||
@ -1186,7 +1186,7 @@ uint32 Client::CalcCurrentWeight() {
|
||||
return Total;
|
||||
}
|
||||
|
||||
int16 Client::CalcAlcoholPhysicalEffect()
|
||||
int32 Client::CalcAlcoholPhysicalEffect()
|
||||
{
|
||||
if(m_pp.intoxication <= 55)
|
||||
return 0;
|
||||
@ -1194,10 +1194,10 @@ int16 Client::CalcAlcoholPhysicalEffect()
|
||||
return (m_pp.intoxication - 40) / 16;
|
||||
}
|
||||
|
||||
int16 Client::CalcSTR() {
|
||||
int16 val = m_pp.STR + itembonuses.STR + spellbonuses.STR + CalcAlcoholPhysicalEffect();
|
||||
int32 Client::CalcSTR() {
|
||||
int32 val = m_pp.STR + itembonuses.STR + spellbonuses.STR + CalcAlcoholPhysicalEffect();
|
||||
|
||||
int16 mod = aabonuses.STR;
|
||||
int32 mod = aabonuses.STR;
|
||||
|
||||
STR = val + mod;
|
||||
|
||||
@ -1211,10 +1211,10 @@ int16 Client::CalcSTR() {
|
||||
return(STR);
|
||||
}
|
||||
|
||||
int16 Client::CalcSTA() {
|
||||
int16 val = m_pp.STA + itembonuses.STA + spellbonuses.STA + CalcAlcoholPhysicalEffect();;
|
||||
int32 Client::CalcSTA() {
|
||||
int32 val = m_pp.STA + itembonuses.STA + spellbonuses.STA + CalcAlcoholPhysicalEffect();;
|
||||
|
||||
int16 mod = aabonuses.STA;
|
||||
int32 mod = aabonuses.STA;
|
||||
|
||||
STA = val + mod;
|
||||
|
||||
@ -1228,18 +1228,18 @@ int16 Client::CalcSTA() {
|
||||
return(STA);
|
||||
}
|
||||
|
||||
int16 Client::CalcAGI() {
|
||||
int16 val = m_pp.AGI + itembonuses.AGI + spellbonuses.AGI - CalcAlcoholPhysicalEffect();;
|
||||
int16 mod = aabonuses.AGI;
|
||||
int32 Client::CalcAGI() {
|
||||
int32 val = m_pp.AGI + itembonuses.AGI + spellbonuses.AGI - CalcAlcoholPhysicalEffect();;
|
||||
int32 mod = aabonuses.AGI;
|
||||
|
||||
int16 str = GetSTR();
|
||||
int32 str = GetSTR();
|
||||
|
||||
//Encumbered penalty
|
||||
if(weight > (str * 10)) {
|
||||
//AGI is halved when we double our weight, zeroed (defaults to 1) when we triple it. this includes AGI from AAs
|
||||
float total_agi = float(val + mod);
|
||||
float str_float = float(str);
|
||||
AGI = (int16)(((-total_agi) / (str_float * 2)) * (((float)weight / 10) - str_float) + total_agi); //casting to an int assumes this will be floor'd. without using floats & casting to int16, the calculation doesn't work right
|
||||
AGI = (int32)(((-total_agi) / (str_float * 2)) * (((float)weight / 10) - str_float) + total_agi); //casting to an int assumes this will be floor'd. without using floats & casting to int16, the calculation doesn't work right
|
||||
} else
|
||||
AGI = val + mod;
|
||||
|
||||
@ -1253,10 +1253,10 @@ int16 Client::CalcAGI() {
|
||||
return(AGI);
|
||||
}
|
||||
|
||||
int16 Client::CalcDEX() {
|
||||
int16 val = m_pp.DEX + itembonuses.DEX + spellbonuses.DEX - CalcAlcoholPhysicalEffect();;
|
||||
int32 Client::CalcDEX() {
|
||||
int32 val = m_pp.DEX + itembonuses.DEX + spellbonuses.DEX - CalcAlcoholPhysicalEffect();;
|
||||
|
||||
int16 mod = aabonuses.DEX;
|
||||
int32 mod = aabonuses.DEX;
|
||||
|
||||
DEX = val + mod;
|
||||
|
||||
@ -1270,16 +1270,16 @@ int16 Client::CalcDEX() {
|
||||
return(DEX);
|
||||
}
|
||||
|
||||
int16 Client::CalcINT() {
|
||||
int16 val = m_pp.INT + itembonuses.INT + spellbonuses.INT;
|
||||
int32 Client::CalcINT() {
|
||||
int32 val = m_pp.INT + itembonuses.INT + spellbonuses.INT;
|
||||
|
||||
int16 mod = aabonuses.INT;
|
||||
int32 mod = aabonuses.INT;
|
||||
|
||||
INT = val + mod;
|
||||
|
||||
if(m_pp.intoxication)
|
||||
{
|
||||
int16 AlcINT = INT - (int16)((float)m_pp.intoxication / 200.0f * (float)INT) - 1;
|
||||
int32 AlcINT = INT - (int32)((float)m_pp.intoxication / 200.0f * (float)INT) - 1;
|
||||
|
||||
if((AlcINT < (int)(0.2 * INT)))
|
||||
INT = (int)(0.2f * (float)INT);
|
||||
@ -1297,16 +1297,16 @@ int16 Client::CalcINT() {
|
||||
return(INT);
|
||||
}
|
||||
|
||||
int16 Client::CalcWIS() {
|
||||
int16 val = m_pp.WIS + itembonuses.WIS + spellbonuses.WIS;
|
||||
int32 Client::CalcWIS() {
|
||||
int32 val = m_pp.WIS + itembonuses.WIS + spellbonuses.WIS;
|
||||
|
||||
int16 mod = aabonuses.WIS;
|
||||
int32 mod = aabonuses.WIS;
|
||||
|
||||
WIS = val + mod;
|
||||
|
||||
if(m_pp.intoxication)
|
||||
{
|
||||
int16 AlcWIS = WIS - (int16)((float)m_pp.intoxication / 200.0f * (float)WIS) - 1;
|
||||
int32 AlcWIS = WIS - (int32)((float)m_pp.intoxication / 200.0f * (float)WIS) - 1;
|
||||
|
||||
if((AlcWIS < (int)(0.2 * WIS)))
|
||||
WIS = (int)(0.2f * (float)WIS);
|
||||
@ -1324,10 +1324,10 @@ int16 Client::CalcWIS() {
|
||||
return(WIS);
|
||||
}
|
||||
|
||||
int16 Client::CalcCHA() {
|
||||
int16 val = m_pp.CHA + itembonuses.CHA + spellbonuses.CHA;
|
||||
int32 Client::CalcCHA() {
|
||||
int32 val = m_pp.CHA + itembonuses.CHA + spellbonuses.CHA;
|
||||
|
||||
int16 mod = aabonuses.CHA;
|
||||
int32 mod = aabonuses.CHA;
|
||||
|
||||
CHA = val + mod;
|
||||
|
||||
@ -1416,7 +1416,7 @@ int Client::CalcHaste()
|
||||
//The AA multipliers are set to be 5, but were 2 on WR
|
||||
//The resistant discipline which I think should be here is implemented
|
||||
//in Mob::ResistSpell
|
||||
int16 Client::CalcMR()
|
||||
int32 Client::CalcMR()
|
||||
{
|
||||
//racial bases
|
||||
switch(GetBaseRace()) {
|
||||
@ -1486,7 +1486,7 @@ int16 Client::CalcMR()
|
||||
return(MR);
|
||||
}
|
||||
|
||||
int16 Client::CalcFR()
|
||||
int32 Client::CalcFR()
|
||||
{
|
||||
//racial bases
|
||||
switch(GetBaseRace()) {
|
||||
@ -1562,7 +1562,7 @@ int16 Client::CalcFR()
|
||||
return(FR);
|
||||
}
|
||||
|
||||
int16 Client::CalcDR()
|
||||
int32 Client::CalcDR()
|
||||
{
|
||||
//racial bases
|
||||
switch(GetBaseRace()) {
|
||||
@ -1645,7 +1645,7 @@ int16 Client::CalcDR()
|
||||
return(DR);
|
||||
}
|
||||
|
||||
int16 Client::CalcPR()
|
||||
int32 Client::CalcPR()
|
||||
{
|
||||
//racial bases
|
||||
switch(GetBaseRace()) {
|
||||
@ -1728,7 +1728,7 @@ int16 Client::CalcPR()
|
||||
return(PR);
|
||||
}
|
||||
|
||||
int16 Client::CalcCR()
|
||||
int32 Client::CalcCR()
|
||||
{
|
||||
//racial bases
|
||||
switch(GetBaseRace()) {
|
||||
@ -1804,7 +1804,7 @@ int16 Client::CalcCR()
|
||||
return(CR);
|
||||
}
|
||||
|
||||
int16 Client::CalcCorrup()
|
||||
int32 Client::CalcCorrup()
|
||||
{
|
||||
Corrup = GetBaseCorrup() + itembonuses.Corrup + spellbonuses.Corrup + aabonuses.Corrup;
|
||||
|
||||
@ -1814,17 +1814,17 @@ int16 Client::CalcCorrup()
|
||||
return(Corrup);
|
||||
}
|
||||
|
||||
int16 Client::CalcATK() {
|
||||
int32 Client::CalcATK() {
|
||||
ATK = itembonuses.ATK + spellbonuses.ATK + aabonuses.ATK + GroupLeadershipAAOffenseEnhancement();
|
||||
return(ATK);
|
||||
}
|
||||
|
||||
uint16 Mob::GetInstrumentMod(uint16 spell_id) const
|
||||
uint32 Mob::GetInstrumentMod(uint16 spell_id) const
|
||||
{
|
||||
if (GetClass() != BARD)
|
||||
return 10;
|
||||
|
||||
uint16 effectmod = 10;
|
||||
uint32 effectmod = 10;
|
||||
int effectmodcap = RuleI(Character, BaseInstrumentSoftCap);
|
||||
|
||||
//this should never use spell modifiers...
|
||||
|
||||
324
zone/common.h
324
zone/common.h
@ -192,7 +192,7 @@ struct Buffs_Struct {
|
||||
};
|
||||
|
||||
struct StatBonuses {
|
||||
int16 AC;
|
||||
int32 AC;
|
||||
int32 HP;
|
||||
int32 HPRegen;
|
||||
int32 MaxHP;
|
||||
@ -200,47 +200,47 @@ struct StatBonuses {
|
||||
int32 EnduranceRegen;
|
||||
int32 Mana;
|
||||
int32 Endurance;
|
||||
int16 ATK;
|
||||
int32 ATK;
|
||||
//would it be worth it to create a Stat_Struct?
|
||||
int16 STR;
|
||||
int16 STRCapMod;
|
||||
int16 HeroicSTR;
|
||||
int16 STA;
|
||||
int16 STACapMod;
|
||||
int16 HeroicSTA;
|
||||
int16 DEX;
|
||||
int16 DEXCapMod;
|
||||
int16 HeroicDEX;
|
||||
int16 AGI;
|
||||
int16 AGICapMod;
|
||||
int16 HeroicAGI;
|
||||
int16 INT;
|
||||
int16 INTCapMod;
|
||||
int16 HeroicINT;
|
||||
int16 WIS;
|
||||
int16 WISCapMod;
|
||||
int16 HeroicWIS;
|
||||
int16 CHA;
|
||||
int16 CHACapMod;
|
||||
int16 HeroicCHA;
|
||||
int16 MR;
|
||||
int16 MRCapMod;
|
||||
int16 HeroicMR;
|
||||
int16 FR;
|
||||
int16 FRCapMod;
|
||||
int16 HeroicFR;
|
||||
int16 CR;
|
||||
int16 CRCapMod;
|
||||
int16 HeroicCR;
|
||||
int16 PR;
|
||||
int16 PRCapMod;
|
||||
int16 HeroicPR;
|
||||
int16 DR;
|
||||
int16 DRCapMod;
|
||||
int16 HeroicDR;
|
||||
int16 Corrup;
|
||||
int16 CorrupCapMod;
|
||||
int16 HeroicCorrup;
|
||||
int32 STR;
|
||||
int32 STRCapMod;
|
||||
int32 HeroicSTR;
|
||||
int32 STA;
|
||||
int32 STACapMod;
|
||||
int32 HeroicSTA;
|
||||
int32 DEX;
|
||||
int32 DEXCapMod;
|
||||
int32 HeroicDEX;
|
||||
int32 AGI;
|
||||
int32 AGICapMod;
|
||||
int32 HeroicAGI;
|
||||
int32 INT;
|
||||
int32 INTCapMod;
|
||||
int32 HeroicINT;
|
||||
int32 WIS;
|
||||
int32 WISCapMod;
|
||||
int32 HeroicWIS;
|
||||
int32 CHA;
|
||||
int32 CHACapMod;
|
||||
int32 HeroicCHA;
|
||||
int32 MR;
|
||||
int32 MRCapMod;
|
||||
int32 HeroicMR;
|
||||
int32 FR;
|
||||
int32 FRCapMod;
|
||||
int32 HeroicFR;
|
||||
int32 CR;
|
||||
int32 CRCapMod;
|
||||
int32 HeroicCR;
|
||||
int32 PR;
|
||||
int32 PRCapMod;
|
||||
int32 HeroicPR;
|
||||
int32 DR;
|
||||
int32 DRCapMod;
|
||||
int32 HeroicDR;
|
||||
int32 Corrup;
|
||||
int32 CorrupCapMod;
|
||||
int32 HeroicCorrup;
|
||||
uint16 DamageShieldSpellID;
|
||||
int DamageShield; // this is damage done to mobs that attack this
|
||||
DmgShieldType DamageShieldType;
|
||||
@ -250,91 +250,91 @@ struct StatBonuses {
|
||||
uint16 ReverseDamageShieldSpellID;
|
||||
DmgShieldType ReverseDamageShieldType;
|
||||
int movementspeed;
|
||||
int16 haste;
|
||||
int16 hastetype2;
|
||||
int16 hastetype3;
|
||||
int16 inhibitmelee;
|
||||
int32 haste;
|
||||
int32 hastetype2;
|
||||
int32 hastetype3;
|
||||
int32 inhibitmelee;
|
||||
float AggroRange; // when calculate just replace original value with this
|
||||
float AssistRange;
|
||||
int16 skillmod[HIGHEST_SKILL+1];
|
||||
int32 skillmod[HIGHEST_SKILL+1];
|
||||
int effective_casting_level;
|
||||
int reflect_chance; // chance to reflect incoming spell
|
||||
uint16 singingMod;
|
||||
uint16 Amplification; // stacks with singingMod
|
||||
uint16 brassMod;
|
||||
uint16 percussionMod;
|
||||
uint16 windMod;
|
||||
uint16 stringedMod;
|
||||
uint16 songModCap;
|
||||
uint32 singingMod;
|
||||
uint32 Amplification; // stacks with singingMod
|
||||
uint32 brassMod;
|
||||
uint32 percussionMod;
|
||||
uint32 windMod;
|
||||
uint32 stringedMod;
|
||||
uint32 songModCap;
|
||||
int8 hatemod;
|
||||
int32 EnduranceReduction;
|
||||
|
||||
int16 StrikeThrough; // PoP: Strike Through %
|
||||
int16 MeleeMitigation; //i = Shielding
|
||||
int16 MeleeMitigationEffect; //i = Spell Effect Melee Mitigation
|
||||
int16 CriticalHitChance[HIGHEST_SKILL+2]; //i
|
||||
int16 CriticalSpellChance; //i
|
||||
int16 SpellCritDmgIncrease; //i
|
||||
int16 SpellCritDmgIncNoStack; // increase
|
||||
int16 DotCritDmgIncrease; //i
|
||||
int16 CriticalHealChance; //i
|
||||
int16 CriticalHealOverTime; //i
|
||||
int16 CriticalDoTChance; //i
|
||||
int16 CrippBlowChance; //
|
||||
int16 AvoidMeleeChance; //AvoidMeleeChance/10 == % chance i = Avoidance (item mod)
|
||||
int16 AvoidMeleeChanceEffect; //AvoidMeleeChance Spell Effect
|
||||
int16 RiposteChance; //i
|
||||
int16 DodgeChance; //i
|
||||
int16 ParryChance; //i
|
||||
int16 DualWieldChance; //i
|
||||
int16 DoubleAttackChance; //i
|
||||
int16 TripleAttackChance; //i
|
||||
int16 DoubleRangedAttack; //i
|
||||
int16 ResistSpellChance; //i
|
||||
int16 ResistFearChance; //i
|
||||
int32 StrikeThrough; // PoP: Strike Through %
|
||||
int32 MeleeMitigation; //i = Shielding
|
||||
int32 MeleeMitigationEffect; //i = Spell Effect Melee Mitigation
|
||||
int32 CriticalHitChance[HIGHEST_SKILL+2]; //i
|
||||
int32 CriticalSpellChance; //i
|
||||
int32 SpellCritDmgIncrease; //i
|
||||
int32 SpellCritDmgIncNoStack; // increase
|
||||
int32 DotCritDmgIncrease; //i
|
||||
int32 CriticalHealChance; //i
|
||||
int32 CriticalHealOverTime; //i
|
||||
int32 CriticalDoTChance; //i
|
||||
int32 CrippBlowChance; //
|
||||
int32 AvoidMeleeChance; //AvoidMeleeChance/10 == % chance i = Avoidance (item mod)
|
||||
int32 AvoidMeleeChanceEffect; //AvoidMeleeChance Spell Effect
|
||||
int32 RiposteChance; //i
|
||||
int32 DodgeChance; //i
|
||||
int32 ParryChance; //i
|
||||
int32 DualWieldChance; //i
|
||||
int32 DoubleAttackChance; //i
|
||||
int32 TripleAttackChance; //i
|
||||
int32 DoubleRangedAttack; //i
|
||||
int32 ResistSpellChance; //i
|
||||
int32 ResistFearChance; //i
|
||||
bool Fearless; //i
|
||||
bool IsFeared; //i
|
||||
bool IsBlind; //i
|
||||
int16 StunResist; //i
|
||||
int16 MeleeSkillCheck; //i
|
||||
int32 StunResist; //i
|
||||
int32 MeleeSkillCheck; //i
|
||||
uint8 MeleeSkillCheckSkill;
|
||||
int16 HitChance; //HitChance/15 == % increase i = Accuracy (Item: Accuracy)
|
||||
int16 HitChanceEffect[HIGHEST_SKILL+2]; //Spell effect Chance to Hit, straight percent increase
|
||||
int16 DamageModifier[HIGHEST_SKILL+2]; //i
|
||||
int16 DamageModifier2[HIGHEST_SKILL+2]; //i
|
||||
int16 MinDamageModifier[HIGHEST_SKILL+2]; //i
|
||||
int16 ProcChance; // ProcChance/10 == % increase i = CombatEffects
|
||||
int16 ProcChanceSPA; // ProcChance from spell effects
|
||||
int16 ExtraAttackChance;
|
||||
int16 DoTShielding;
|
||||
int16 DivineSaveChance[2]; // Second Chance (base1 = chance, base2 = spell on trigger)
|
||||
uint16 DeathSave[4]; // Death Pact [0](value = 1 partial 2 = full) [1]=slot [2]=LvLimit [3]=HealAmt
|
||||
int16 FlurryChance;
|
||||
int16 Accuracy[HIGHEST_SKILL+2]; //Accuracy/15 == % increase [Spell Effect: Accuracy)
|
||||
int16 HundredHands; //extra haste, stacks with all other haste i
|
||||
int32 HitChance; //HitChance/15 == % increase i = Accuracy (Item: Accuracy)
|
||||
int32 HitChanceEffect[HIGHEST_SKILL+2]; //Spell effect Chance to Hit, straight percent increase
|
||||
int32 DamageModifier[HIGHEST_SKILL+2]; //i
|
||||
int32 DamageModifier2[HIGHEST_SKILL+2]; //i
|
||||
int32 MinDamageModifier[HIGHEST_SKILL+2]; //i
|
||||
int32 ProcChance; // ProcChance/10 == % increase i = CombatEffects
|
||||
int32 ProcChanceSPA; // ProcChance from spell effects
|
||||
int32 ExtraAttackChance;
|
||||
int32 DoTShielding;
|
||||
int32 DivineSaveChance[2]; // Second Chance (base1 = chance, base2 = spell on trigger)
|
||||
uint32 DeathSave[4]; // Death Pact [0](value = 1 partial 2 = full) [1]=slot [2]=LvLimit [3]=HealAmt
|
||||
int32 FlurryChance;
|
||||
int32 Accuracy[HIGHEST_SKILL+2]; //Accuracy/15 == % increase [Spell Effect: Accuracy)
|
||||
int32 HundredHands; //extra haste, stacks with all other haste i
|
||||
int32 MeleeLifetap; //i
|
||||
int32 Vampirism; //i
|
||||
int16 HealRate; // Spell effect that influences effectiveness of heals
|
||||
int32 HealRate; // Spell effect that influences effectiveness of heals
|
||||
int32 MaxHPChange; // Spell Effect
|
||||
int16 SkillDmgTaken[HIGHEST_SKILL+2]; // All Skills + -1
|
||||
int32 HealAmt; // Item Effect
|
||||
int32 SpellDmg; // Item Effect
|
||||
int32 Clairvoyance; // Item Effect
|
||||
int16 DSMitigation; // Item Effect
|
||||
int16 DSMitigationOffHand; // Lowers damage shield from off hand attacks.
|
||||
int32 DSMitigation; // Item Effect
|
||||
int32 DSMitigationOffHand; // Lowers damage shield from off hand attacks.
|
||||
uint32 SpellTriggers[MAX_SPELL_TRIGGER]; // Innate/Spell/Item Spells that trigger when you cast
|
||||
uint32 SpellOnKill[MAX_SPELL_TRIGGER*3]; // Chance to proc after killing a mob
|
||||
uint32 SpellOnDeath[MAX_SPELL_TRIGGER*2]; // Chance to have effect cast when you die
|
||||
int16 CritDmgMob[HIGHEST_SKILL+2]; // All Skills + -1
|
||||
int16 SkillReuseTime[HIGHEST_SKILL+1]; // Reduces skill timers
|
||||
int16 SkillDamageAmount[HIGHEST_SKILL+2]; // All Skills + -1
|
||||
int16 TwoHandBluntBlock; // chance to block when wielding two hand blunt weapon
|
||||
uint16 ItemManaRegenCap; // Increases the amount of mana you have can over the cap(aa effect)
|
||||
int16 GravityEffect; // Indictor of spell effect
|
||||
int32 CritDmgMob[HIGHEST_SKILL+2]; // All Skills + -1
|
||||
int32 SkillReuseTime[HIGHEST_SKILL+1]; // Reduces skill timers
|
||||
int32 SkillDamageAmount[HIGHEST_SKILL+2]; // All Skills + -1
|
||||
int32 TwoHandBluntBlock; // chance to block when wielding two hand blunt weapon
|
||||
uint32 ItemManaRegenCap; // Increases the amount of mana you have can over the cap(aa effect)
|
||||
int32 GravityEffect; // Indictor of spell effect
|
||||
bool AntiGate; // spell effect that prevents gating
|
||||
bool MagicWeapon; // spell effect that makes weapon magical
|
||||
int16 IncreaseBlockChance; // overall block chance modifier
|
||||
uint16 PersistantCasting; // chance to continue casting through a stun
|
||||
int32 IncreaseBlockChance; // overall block chance modifier
|
||||
uint32 PersistantCasting; // chance to continue casting through a stun
|
||||
int XPRateMod; //i
|
||||
int HPPercCap[2]; //Spell effect that limits you to being healed/regening beyond a % of your max
|
||||
int ManaPercCap[2]; // ^^ 0 = % Cap 1 = Flat Amount Cap
|
||||
@ -342,64 +342,64 @@ struct StatBonuses {
|
||||
bool BlockNextSpell; // Indicates whether the client can block a spell or not
|
||||
//uint16 BlockSpellEffect[EFFECT_COUNT]; // Prevents spells with certain effects from landing on you *no longer used
|
||||
bool ImmuneToFlee; // Bypass the fleeing flag
|
||||
uint16 VoiceGraft; // Stores the ID of the mob with which to talk through
|
||||
int16 SpellProcChance; // chance to proc from sympathetic spell effects
|
||||
int16 CharmBreakChance; // chance to break charm
|
||||
int16 SongRange; // increases range of beneficial bard songs
|
||||
uint16 HPToManaConvert; // Uses HP to cast spells at specific conversion
|
||||
uint16 FocusEffects[HIGHEST_FOCUS+1]; // Stores the focus effectid for each focustype you have.
|
||||
uint32 VoiceGraft; // Stores the ID of the mob with which to talk through
|
||||
int32 SpellProcChance; // chance to proc from sympathetic spell effects
|
||||
int32 CharmBreakChance; // chance to break charm
|
||||
int32 SongRange; // increases range of beneficial bard songs
|
||||
uint32 HPToManaConvert; // Uses HP to cast spells at specific conversion
|
||||
uint32 FocusEffects[HIGHEST_FOCUS+1]; // Stores the focus effectid for each focustype you have.
|
||||
bool NegateEffects; // Check if you contain a buff with negate effect. (only spellbonuses)
|
||||
int16 SkillDamageAmount2[HIGHEST_SKILL+2]; // Adds skill specific damage
|
||||
uint16 NegateAttacks[3]; // 0 = bool HasEffect 1 = Buff Slot 2 = Max damage absorbed per hit
|
||||
uint16 MitigateMeleeRune[4]; // 0 = Mitigation value 1 = Buff Slot 2 = Max mitigation per hit 3 = Rune Amt
|
||||
uint16 MeleeThresholdGuard[3]; // 0 = Mitigation value 1 = Buff Slot 2 = Min damage to trigger.
|
||||
uint16 SpellThresholdGuard[3]; // 0 = Mitigation value 1 = Buff Slot 2 = Min damage to trigger.
|
||||
uint16 MitigateSpellRune[4]; // 0 = Mitigation value 1 = Buff Slot 2 = Max mitigation per spell 3 = Rune Amt
|
||||
uint16 MitigateDotRune[4]; // 0 = Mitigation value 1 = Buff Slot 2 = Max mitigation per tick 3 = Rune Amt
|
||||
int32 SkillDamageAmount2[HIGHEST_SKILL+2]; // Adds skill specific damage
|
||||
uint32 NegateAttacks[3]; // 0 = bool HasEffect 1 = Buff Slot 2 = Max damage absorbed per hit
|
||||
uint32 MitigateMeleeRune[4]; // 0 = Mitigation value 1 = Buff Slot 2 = Max mitigation per hit 3 = Rune Amt
|
||||
uint32 MeleeThresholdGuard[3]; // 0 = Mitigation value 1 = Buff Slot 2 = Min damage to trigger.
|
||||
uint32 SpellThresholdGuard[3]; // 0 = Mitigation value 1 = Buff Slot 2 = Min damage to trigger.
|
||||
uint32 MitigateSpellRune[4]; // 0 = Mitigation value 1 = Buff Slot 2 = Max mitigation per spell 3 = Rune Amt
|
||||
uint32 MitigateDotRune[4]; // 0 = Mitigation value 1 = Buff Slot 2 = Max mitigation per tick 3 = Rune Amt
|
||||
bool TriggerMeleeThreshold; // Has Melee Threshhold
|
||||
bool TriggerSpellThreshold; // Has Spell Threshhold
|
||||
uint16 ManaAbsorbPercentDamage[2]; // 0 = Mitigation value 1 = Buff Slot
|
||||
int16 ShieldBlock; // Chance to Shield Block
|
||||
int16 BlockBehind; // Chance to Block Behind (with our without shield)
|
||||
uint32 ManaAbsorbPercentDamage[2]; // 0 = Mitigation value 1 = Buff Slot
|
||||
int32 ShieldBlock; // Chance to Shield Block
|
||||
int32 BlockBehind; // Chance to Block Behind (with our without shield)
|
||||
bool CriticalRegenDecay; // increase critical regen chance, decays based on spell level cast
|
||||
bool CriticalHealDecay; // increase critical heal chance, decays based on spell level cast
|
||||
bool CriticalDotDecay; // increase critical dot chance, decays based on spell level cast
|
||||
bool DivineAura; // invulnerability
|
||||
bool DistanceRemoval; // Check if Cancle if Moved effect is present
|
||||
int16 ImprovedTaunt[3]; // 0 = Max Level 1 = Aggro modifier 2 = buffid
|
||||
int32 ImprovedTaunt[3]; // 0 = Max Level 1 = Aggro modifier 2 = buffid
|
||||
int8 Root[2]; // The lowest buff slot a root can be found. [0] = Bool if has root [1] = buff slot
|
||||
int16 FrenziedDevastation; // base1= AArank(used) base2= chance increase spell criticals + all DD spells 2x mana.
|
||||
uint16 AbsorbMagicAtt[2]; // 0 = magic rune value 1 = buff slot
|
||||
uint16 MeleeRune[2]; // 0 = rune value 1 = buff slot
|
||||
int32 FrenziedDevastation; // base1= AArank(used) base2= chance increase spell criticals + all DD spells 2x mana.
|
||||
uint32 AbsorbMagicAtt[2]; // 0 = magic rune value 1 = buff slot
|
||||
uint32 MeleeRune[2]; // 0 = rune value 1 = buff slot
|
||||
bool NegateIfCombat; // Bool Drop buff if cast or melee
|
||||
int8 Screech; // -1 = Will be blocked if another Screech is +(1)
|
||||
int16 AlterNPCLevel; // amount of lvls +/-
|
||||
int16 AStacker[2]; // For buff stack blocking 0=Exists 1=Effect_value
|
||||
int16 BStacker[2]; // For buff stack blocking 0=Exists 1=Effect_value
|
||||
int16 CStacker[2]; // For buff stack blocking 0=Exists 1=Effect_value
|
||||
int16 DStacker[2]; // For buff stack blocking 0=Exists 1=Effect_value
|
||||
int32 AlterNPCLevel; // amount of lvls +/-
|
||||
int32 AStacker[2]; // For buff stack blocking 0=Exists 1=Effect_value
|
||||
int32 BStacker[2]; // For buff stack blocking 0=Exists 1=Effect_value
|
||||
int32 CStacker[2]; // For buff stack blocking 0=Exists 1=Effect_value
|
||||
int32 DStacker[2]; // For buff stack blocking 0=Exists 1=Effect_value
|
||||
bool BerserkSPA; // berserk effect
|
||||
int16 Metabolism; // Food/drink consumption rates.
|
||||
int32 Metabolism; // Food/drink consumption rates.
|
||||
bool Sanctuary; // Sanctuary effect, lowers place on hate list until cast on others.
|
||||
int16 FactionModPct; // Modifies amount of faction gained.
|
||||
int16 MeleeVulnerability; // Weakness/mitigation to melee damage
|
||||
int32 FactionModPct; // Modifies amount of faction gained.
|
||||
int32 MeleeVulnerability; // Weakness/mitigation to melee damage
|
||||
bool LimitToSkill[HIGHEST_SKILL+2]; // Determines if we need to search for a skill proc.
|
||||
uint16 SkillProc[MAX_SKILL_PROCS]; // Max number of spells containing skill_procs.
|
||||
uint16 SkillProcSuccess[MAX_SKILL_PROCS]; // Max number of spells containing skill_procs_success.
|
||||
uint32 SkillProc[MAX_SKILL_PROCS]; // Max number of spells containing skill_procs.
|
||||
uint32 SkillProcSuccess[MAX_SKILL_PROCS]; // Max number of spells containing skill_procs_success.
|
||||
|
||||
// AAs
|
||||
int8 Packrat; //weight reduction for items, 1 point = 10%
|
||||
uint8 BuffSlotIncrease; // Increases number of available buff slots
|
||||
uint16 DelayDeath; // how far below 0 hp you can go
|
||||
uint32 DelayDeath; // how far below 0 hp you can go
|
||||
int8 BaseMovementSpeed; // Adjust base run speed, does not stack with other movement bonuses.
|
||||
uint8 IncreaseRunSpeedCap; // Increase max run speed above cap.
|
||||
int16 DoubleSpecialAttack; // Chance to to perform a double special attack (ie flying kick 2x)
|
||||
int16 SpecialAttackKBProc[2]; // Chance to to do a knockback from special attacks. (0 = chance 1 = Skill)
|
||||
int32 DoubleSpecialAttack; // Chance to to perform a double special attack (ie flying kick 2x)
|
||||
int32 SpecialAttackKBProc[2]; // Chance to to do a knockback from special attacks. (0 = chance 1 = Skill)
|
||||
uint8 FrontalStunResist; // Chance to resist a frontal stun
|
||||
int16 BindWound; // Increase amount of HP by percent.
|
||||
int16 MaxBindWound; // Increase max amount of HP you can bind wound.
|
||||
int16 ChannelChanceSpells; // Modify chance to channel a spell.
|
||||
int16 ChannelChanceItems; // Modify chance to channel a items.
|
||||
int32 BindWound; // Increase amount of HP by percent.
|
||||
int32 MaxBindWound; // Increase max amount of HP you can bind wound.
|
||||
int32 ChannelChanceSpells; // Modify chance to channel a spell.
|
||||
int32 ChannelChanceItems; // Modify chance to channel a items.
|
||||
uint8 SeeInvis; // See Invs.
|
||||
uint8 TripleBackstab; // Chance to triple backstab
|
||||
bool FrontalBackstabMinDmg; // Allow frontal backstabs for min damage
|
||||
@ -407,36 +407,36 @@ struct StatBonuses {
|
||||
uint8 ConsumeProjectile; // Chance to not consume arrow.
|
||||
uint8 ForageAdditionalItems; // Chance to forage another item.
|
||||
uint8 SalvageChance; // Chance to salvage a tradeskill components on fail.
|
||||
uint16 ArcheryDamageModifier; // Increase Archery Damage by percent
|
||||
uint32 ArcheryDamageModifier; // Increase Archery Damage by percent
|
||||
bool SecondaryDmgInc; // Allow off hand weapon to recieve damage bonus.
|
||||
uint16 GiveDoubleAttack; // Allow classes to double attack with a specified chance.
|
||||
int16 SlayUndead[2]; // Allow classes to do extra damage verse undead.(base1 = rate, base2 = damage mod)
|
||||
int16 PetCriticalHit; // Allow pets to critical hit with % value.
|
||||
int16 PetAvoidance; // Pet avoidance chance.
|
||||
int16 CombatStability; // Melee damage mitigation.
|
||||
int16 DoubleRiposte; // Chance to double riposte
|
||||
int16 GiveDoubleRiposte[3]; // 0=Regular Chance, 1=Skill Attack Chance, 2=Skill
|
||||
uint16 RaiseSkillCap[2]; // Raise a specific skill cap (1 = value, 2=skill)
|
||||
int16 Ambidexterity; // Increase chance to duel wield by adding bonus 'skill'.
|
||||
int16 PetMaxHP; // Increase the max hp of your pet.
|
||||
int16 PetFlurry; // Chance for pet to flurry.
|
||||
uint32 GiveDoubleAttack; // Allow classes to double attack with a specified chance.
|
||||
int32 SlayUndead[2]; // Allow classes to do extra damage verse undead.(base1 = rate, base2 = damage mod)
|
||||
int32 PetCriticalHit; // Allow pets to critical hit with % value.
|
||||
int32 PetAvoidance; // Pet avoidance chance.
|
||||
int32 CombatStability; // Melee damage mitigation.
|
||||
int32 DoubleRiposte; // Chance to double riposte
|
||||
int32 GiveDoubleRiposte[3]; // 0=Regular Chance, 1=Skill Attack Chance, 2=Skill
|
||||
uint32 RaiseSkillCap[2]; // Raise a specific skill cap (1 = value, 2=skill)
|
||||
int32 Ambidexterity; // Increase chance to duel wield by adding bonus 'skill'.
|
||||
int32 PetMaxHP; // Increase the max hp of your pet.
|
||||
int32 PetFlurry; // Chance for pet to flurry.
|
||||
uint8 MasteryofPast; // Can not fizzle spells below this level specified in value.
|
||||
bool GivePetGroupTarget; // All pets to recieve group buffs. (Pet Affinity)
|
||||
int16 RootBreakChance; // Chance root will break;
|
||||
int16 UnfailingDivinity; // Improves chance that DI will fire + increase partial heal.
|
||||
int16 ItemHPRegenCap; // Increase item regen cap.
|
||||
int16 SEResist[MAX_RESISTABLE_EFFECTS*2]; // Resist chance by specific spell effects.
|
||||
int16 OffhandRiposteFail; // chance for opponent to fail riposte with offhand attack.
|
||||
int16 ItemATKCap; // Raise item attack cap
|
||||
int32 RootBreakChance; // Chance root will break;
|
||||
int32 UnfailingDivinity; // Improves chance that DI will fire + increase partial heal.
|
||||
int32 ItemHPRegenCap; // Increase item regen cap.
|
||||
int32 SEResist[MAX_RESISTABLE_EFFECTS*2]; // Resist chance by specific spell effects.
|
||||
int32 OffhandRiposteFail; // chance for opponent to fail riposte with offhand attack.
|
||||
int32 ItemATKCap; // Raise item attack cap
|
||||
int32 FinishingBlow[2]; // Chance to do a finishing blow for specified damage amount.
|
||||
uint16 FinishingBlowLvl[2]; // Sets max level an NPC can be affected by FB. (base1 = lv, base2= ???)
|
||||
int16 ShieldEquipHateMod; // Hate mod when shield equiped.
|
||||
int16 ShieldEquipDmgMod[2]; // Damage mod when shield equiped. 0 = damage modifier 1 = Unknown
|
||||
uint32 FinishingBlowLvl[2]; // Sets max level an NPC can be affected by FB. (base1 = lv, base2= ???)
|
||||
int32 ShieldEquipHateMod; // Hate mod when shield equiped.
|
||||
int32 ShieldEquipDmgMod[2]; // Damage mod when shield equiped. 0 = damage modifier 1 = Unknown
|
||||
bool TriggerOnValueAmount; // Triggers off various different conditions, bool to check if client has effect.
|
||||
int8 StunBashChance; // chance to stun with bash.
|
||||
int8 IncreaseChanceMemwipe; // increases chance to memory wipe
|
||||
int8 CriticalMend; // chance critical monk mend
|
||||
int16 ImprovedReclaimEnergy; // Modifies amount of mana returned from reclaim energy
|
||||
int32 ImprovedReclaimEnergy; // Modifies amount of mana returned from reclaim energy
|
||||
uint32 HeadShot[2]; // Headshot AA (Massive dmg vs humaniod w/ archery) 0= ? 1= Dmg
|
||||
uint8 HSLevel; // Max Level Headshot will be effective at.
|
||||
uint32 Assassinate[2]; // Assassinate AA (Massive dmg vs humaniod w/ assassinate) 0= ? 1= Dmg
|
||||
|
||||
@ -717,10 +717,10 @@ int Merc::GroupLeadershipAAOffenseEnhancement()
|
||||
return 0;
|
||||
}
|
||||
|
||||
int16 Merc::CalcSTR() {
|
||||
int16 val = _baseSTR + itembonuses.STR + spellbonuses.STR;
|
||||
int32 Merc::CalcSTR() {
|
||||
int32 val = _baseSTR + itembonuses.STR + spellbonuses.STR;
|
||||
|
||||
int16 mod = aabonuses.STR;
|
||||
int32 mod = aabonuses.STR;
|
||||
|
||||
STR = val + mod;
|
||||
|
||||
@ -730,10 +730,10 @@ int16 Merc::CalcSTR() {
|
||||
return(STR);
|
||||
}
|
||||
|
||||
int16 Merc::CalcSTA() {
|
||||
int16 val = _baseSTA + itembonuses.STA + spellbonuses.STA;
|
||||
int32 Merc::CalcSTA() {
|
||||
int32 val = _baseSTA + itembonuses.STA + spellbonuses.STA;
|
||||
|
||||
int16 mod = aabonuses.STA;
|
||||
int32 mod = aabonuses.STA;
|
||||
|
||||
STA = val + mod;
|
||||
|
||||
@ -743,11 +743,11 @@ int16 Merc::CalcSTA() {
|
||||
return(STA);
|
||||
}
|
||||
|
||||
int16 Merc::CalcAGI() {
|
||||
int16 val = _baseAGI + itembonuses.AGI + spellbonuses.AGI;
|
||||
int16 mod = aabonuses.AGI;
|
||||
int32 Merc::CalcAGI() {
|
||||
int32 val = _baseAGI + itembonuses.AGI + spellbonuses.AGI;
|
||||
int32 mod = aabonuses.AGI;
|
||||
|
||||
int16 str = GetSTR();
|
||||
int32 str = GetSTR();
|
||||
|
||||
AGI = val + mod;
|
||||
|
||||
@ -757,10 +757,10 @@ int16 Merc::CalcAGI() {
|
||||
return(AGI);
|
||||
}
|
||||
|
||||
int16 Merc::CalcDEX() {
|
||||
int16 val = _baseDEX + itembonuses.DEX + spellbonuses.DEX;
|
||||
int32 Merc::CalcDEX() {
|
||||
int32 val = _baseDEX + itembonuses.DEX + spellbonuses.DEX;
|
||||
|
||||
int16 mod = aabonuses.DEX;
|
||||
int32 mod = aabonuses.DEX;
|
||||
|
||||
DEX = val + mod;
|
||||
|
||||
@ -770,10 +770,10 @@ int16 Merc::CalcDEX() {
|
||||
return(DEX);
|
||||
}
|
||||
|
||||
int16 Merc::CalcINT() {
|
||||
int16 val = _baseINT + itembonuses.INT + spellbonuses.INT;
|
||||
int32 Merc::CalcINT() {
|
||||
int32 val = _baseINT + itembonuses.INT + spellbonuses.INT;
|
||||
|
||||
int16 mod = aabonuses.INT;
|
||||
int32 mod = aabonuses.INT;
|
||||
|
||||
INT = val + mod;
|
||||
|
||||
@ -783,10 +783,10 @@ int16 Merc::CalcINT() {
|
||||
return(INT);
|
||||
}
|
||||
|
||||
int16 Merc::CalcWIS() {
|
||||
int16 val = _baseWIS + itembonuses.WIS + spellbonuses.WIS;
|
||||
int32 Merc::CalcWIS() {
|
||||
int32 val = _baseWIS + itembonuses.WIS + spellbonuses.WIS;
|
||||
|
||||
int16 mod = aabonuses.WIS;
|
||||
int32 mod = aabonuses.WIS;
|
||||
|
||||
WIS = val + mod;
|
||||
|
||||
@ -796,10 +796,10 @@ int16 Merc::CalcWIS() {
|
||||
return(WIS);
|
||||
}
|
||||
|
||||
int16 Merc::CalcCHA() {
|
||||
int16 val = _baseCHA + itembonuses.CHA + spellbonuses.CHA;
|
||||
int32 Merc::CalcCHA() {
|
||||
int32 val = _baseCHA + itembonuses.CHA + spellbonuses.CHA;
|
||||
|
||||
int16 mod = aabonuses.CHA;
|
||||
int32 mod = aabonuses.CHA;
|
||||
|
||||
CHA = val + mod;
|
||||
|
||||
@ -812,7 +812,7 @@ int16 Merc::CalcCHA() {
|
||||
//The AA multipliers are set to be 5, but were 2 on WR
|
||||
//The resistant discipline which I think should be here is implemented
|
||||
//in Mob::ResistSpell
|
||||
int16 Merc::CalcMR()
|
||||
int32 Merc::CalcMR()
|
||||
{
|
||||
MR = _baseMR + itembonuses.MR + spellbonuses.MR + aabonuses.MR;
|
||||
|
||||
@ -822,7 +822,7 @@ int16 Merc::CalcMR()
|
||||
return(MR);
|
||||
}
|
||||
|
||||
int16 Merc::CalcFR()
|
||||
int32 Merc::CalcFR()
|
||||
{
|
||||
FR = _baseFR + itembonuses.FR + spellbonuses.FR + aabonuses.FR;
|
||||
|
||||
@ -832,7 +832,7 @@ int16 Merc::CalcFR()
|
||||
return(FR);
|
||||
}
|
||||
|
||||
int16 Merc::CalcDR()
|
||||
int32 Merc::CalcDR()
|
||||
{
|
||||
DR = _baseDR + itembonuses.DR + spellbonuses.DR + aabonuses.DR;
|
||||
|
||||
@ -842,7 +842,7 @@ int16 Merc::CalcDR()
|
||||
return(DR);
|
||||
}
|
||||
|
||||
int16 Merc::CalcPR()
|
||||
int32 Merc::CalcPR()
|
||||
{
|
||||
PR = _basePR + itembonuses.PR + spellbonuses.PR + aabonuses.PR;
|
||||
|
||||
@ -852,7 +852,7 @@ int16 Merc::CalcPR()
|
||||
return(PR);
|
||||
}
|
||||
|
||||
int16 Merc::CalcCR()
|
||||
int32 Merc::CalcCR()
|
||||
{
|
||||
CR = _baseCR + itembonuses.CR + spellbonuses.CR + aabonuses.CR;
|
||||
|
||||
@ -862,19 +862,19 @@ int16 Merc::CalcCR()
|
||||
return(CR);
|
||||
}
|
||||
|
||||
int16 Merc::CalcCorrup()
|
||||
int32 Merc::CalcCorrup()
|
||||
{
|
||||
Corrup = _baseCorrup + itembonuses.Corrup + spellbonuses.Corrup + aabonuses.Corrup;
|
||||
|
||||
return(Corrup);
|
||||
}
|
||||
|
||||
int16 Merc::CalcATK() {
|
||||
int32 Merc::CalcATK() {
|
||||
ATK = _baseATK + itembonuses.ATK + spellbonuses.ATK + aabonuses.ATK + GroupLeadershipAAOffenseEnhancement();
|
||||
return(ATK);
|
||||
}
|
||||
|
||||
int16 Merc::CalcAC() {
|
||||
int32 Merc::CalcAC() {
|
||||
//spell AC bonuses are added directly to natural total
|
||||
AC = _baseAC + spellbonuses.AC;
|
||||
return(AC);
|
||||
|
||||
160
zone/merc.h
160
zone/merc.h
@ -181,58 +181,58 @@ public:
|
||||
inline virtual int32 GetAC() const { return AC; }
|
||||
inline virtual int32 GetATK() const { return ATK; }
|
||||
inline virtual int32 GetATKBonus() const { return itembonuses.ATK + spellbonuses.ATK; }
|
||||
int GetRawACNoShield(int &shield_ac) const;
|
||||
int32 GetRawACNoShield(int &shield_ac) const;
|
||||
|
||||
inline virtual int16 GetSTR() const { return STR; }
|
||||
inline virtual int16 GetSTA() const { return STA; }
|
||||
inline virtual int16 GetDEX() const { return DEX; }
|
||||
inline virtual int16 GetAGI() const { return AGI; }
|
||||
inline virtual int16 GetINT() const { return INT; }
|
||||
inline virtual int16 GetWIS() const { return WIS; }
|
||||
inline virtual int16 GetCHA() const { return CHA; }
|
||||
inline virtual int16 GetMR() const { return MR; }
|
||||
inline virtual int16 GetFR() const { return FR; }
|
||||
inline virtual int16 GetDR() const { return DR; }
|
||||
inline virtual int16 GetPR() const { return PR; }
|
||||
inline virtual int16 GetCR() const { return CR; }
|
||||
inline virtual int16 GetCorrup() const { return Corrup; }
|
||||
inline virtual int32 GetSTR() const { return STR; }
|
||||
inline virtual int32 GetSTA() const { return STA; }
|
||||
inline virtual int32 GetDEX() const { return DEX; }
|
||||
inline virtual int32 GetAGI() const { return AGI; }
|
||||
inline virtual int32 GetINT() const { return INT; }
|
||||
inline virtual int32 GetWIS() const { return WIS; }
|
||||
inline virtual int32 GetCHA() const { return CHA; }
|
||||
inline virtual int32 GetMR() const { return MR; }
|
||||
inline virtual int32 GetFR() const { return FR; }
|
||||
inline virtual int32 GetDR() const { return DR; }
|
||||
inline virtual int32 GetPR() const { return PR; }
|
||||
inline virtual int32 GetCR() const { return CR; }
|
||||
inline virtual int32 GetCorrup() const { return Corrup; }
|
||||
|
||||
inline virtual int16 GetHeroicSTR() const { return itembonuses.HeroicSTR; }
|
||||
inline virtual int16 GetHeroicSTA() const { return itembonuses.HeroicSTA; }
|
||||
inline virtual int16 GetHeroicDEX() const { return itembonuses.HeroicDEX; }
|
||||
inline virtual int16 GetHeroicAGI() const { return itembonuses.HeroicAGI; }
|
||||
inline virtual int16 GetHeroicINT() const { return itembonuses.HeroicINT; }
|
||||
inline virtual int16 GetHeroicWIS() const { return itembonuses.HeroicWIS; }
|
||||
inline virtual int16 GetHeroicCHA() const { return itembonuses.HeroicCHA; }
|
||||
inline virtual int16 GetHeroicMR() const { return itembonuses.HeroicMR; }
|
||||
inline virtual int16 GetHeroicFR() const { return itembonuses.HeroicFR; }
|
||||
inline virtual int16 GetHeroicDR() const { return itembonuses.HeroicDR; }
|
||||
inline virtual int16 GetHeroicPR() const { return itembonuses.HeroicPR; }
|
||||
inline virtual int16 GetHeroicCR() const { return itembonuses.HeroicCR; }
|
||||
inline virtual int16 GetHeroicCorrup() const { return itembonuses.HeroicCorrup; }
|
||||
inline virtual int32 GetHeroicSTR() const { return itembonuses.HeroicSTR; }
|
||||
inline virtual int32 GetHeroicSTA() const { return itembonuses.HeroicSTA; }
|
||||
inline virtual int32 GetHeroicDEX() const { return itembonuses.HeroicDEX; }
|
||||
inline virtual int32 GetHeroicAGI() const { return itembonuses.HeroicAGI; }
|
||||
inline virtual int32 GetHeroicINT() const { return itembonuses.HeroicINT; }
|
||||
inline virtual int32 GetHeroicWIS() const { return itembonuses.HeroicWIS; }
|
||||
inline virtual int32 GetHeroicCHA() const { return itembonuses.HeroicCHA; }
|
||||
inline virtual int32 GetHeroicMR() const { return itembonuses.HeroicMR; }
|
||||
inline virtual int32 GetHeroicFR() const { return itembonuses.HeroicFR; }
|
||||
inline virtual int32 GetHeroicDR() const { return itembonuses.HeroicDR; }
|
||||
inline virtual int32 GetHeroicPR() const { return itembonuses.HeroicPR; }
|
||||
inline virtual int32 GetHeroicCR() const { return itembonuses.HeroicCR; }
|
||||
inline virtual int32 GetHeroicCorrup() const { return itembonuses.HeroicCorrup; }
|
||||
// Mod2
|
||||
inline virtual int16 GetShielding() const { return itembonuses.MeleeMitigation; }
|
||||
inline virtual int16 GetSpellShield() const { return itembonuses.SpellShield; }
|
||||
inline virtual int16 GetDoTShield() const { return itembonuses.DoTShielding; }
|
||||
inline virtual int16 GetStunResist() const { return itembonuses.StunResist; }
|
||||
inline virtual int16 GetStrikeThrough() const { return itembonuses.StrikeThrough; }
|
||||
inline virtual int16 GetAvoidance() const { return itembonuses.AvoidMeleeChance; }
|
||||
inline virtual int16 GetAccuracy() const { return itembonuses.HitChance; }
|
||||
inline virtual int16 GetCombatEffects() const { return itembonuses.ProcChance; }
|
||||
inline virtual int16 GetDS() const { return itembonuses.DamageShield; }
|
||||
inline virtual int32 GetShielding() const { return itembonuses.MeleeMitigation; }
|
||||
inline virtual int32 GetSpellShield() const { return itembonuses.SpellShield; }
|
||||
inline virtual int32 GetDoTShield() const { return itembonuses.DoTShielding; }
|
||||
inline virtual int32 GetStunResist() const { return itembonuses.StunResist; }
|
||||
inline virtual int32 GetStrikeThrough() const { return itembonuses.StrikeThrough; }
|
||||
inline virtual int32 GetAvoidance() const { return itembonuses.AvoidMeleeChance; }
|
||||
inline virtual int32 GetAccuracy() const { return itembonuses.HitChance; }
|
||||
inline virtual int32 GetCombatEffects() const { return itembonuses.ProcChance; }
|
||||
inline virtual int32 GetDS() const { return itembonuses.DamageShield; }
|
||||
// Mod3
|
||||
inline virtual int16 GetHealAmt() const { return itembonuses.HealAmt; }
|
||||
inline virtual int16 GetSpellDmg() const { return itembonuses.SpellDmg; }
|
||||
inline virtual int16 GetClair() const { return itembonuses.Clairvoyance; }
|
||||
inline virtual int16 GetDSMit() const { return itembonuses.DSMitigation; }
|
||||
inline virtual int32 GetHealAmt() const { return itembonuses.HealAmt; }
|
||||
inline virtual int32 GetSpellDmg() const { return itembonuses.SpellDmg; }
|
||||
inline virtual int32 GetClair() const { return itembonuses.Clairvoyance; }
|
||||
inline virtual int32 GetDSMit() const { return itembonuses.DSMitigation; }
|
||||
|
||||
inline virtual int16 GetSingMod() const { return itembonuses.singingMod; }
|
||||
inline virtual int16 GetBrassMod() const { return itembonuses.brassMod; }
|
||||
inline virtual int16 GetPercMod() const { return itembonuses.percussionMod; }
|
||||
inline virtual int16 GetStringMod() const { return itembonuses.stringedMod; }
|
||||
inline virtual int16 GetWindMod() const { return itembonuses.windMod; }
|
||||
inline virtual int32 GetSingMod() const { return itembonuses.singingMod; }
|
||||
inline virtual int32 GetBrassMod() const { return itembonuses.brassMod; }
|
||||
inline virtual int32 GetPercMod() const { return itembonuses.percussionMod; }
|
||||
inline virtual int32 GetStringMod() const { return itembonuses.stringedMod; }
|
||||
inline virtual int32 GetWindMod() const { return itembonuses.windMod; }
|
||||
|
||||
inline virtual int16 GetDelayDeath() const { return aabonuses.DelayDeath + spellbonuses.DelayDeath + itembonuses.DelayDeath + 11; }
|
||||
inline virtual int32 GetDelayDeath() const { return aabonuses.DelayDeath + spellbonuses.DelayDeath + itembonuses.DelayDeath + 11; }
|
||||
|
||||
// "SET" Class Methods
|
||||
void SetMercData (uint32 templateID );
|
||||
@ -281,27 +281,27 @@ protected:
|
||||
|
||||
private:
|
||||
|
||||
int16 CalcAC();
|
||||
int16 GetACMit();
|
||||
int16 GetACAvoid();
|
||||
int16 acmod();
|
||||
int16 CalcATK();
|
||||
int32 CalcAC();
|
||||
int32 GetACMit();
|
||||
int32 GetACAvoid();
|
||||
int32 acmod();
|
||||
int32 CalcATK();
|
||||
//int CalcHaste();
|
||||
|
||||
int16 CalcSTR();
|
||||
int16 CalcSTA();
|
||||
int16 CalcDEX();
|
||||
int16 CalcAGI();
|
||||
int16 CalcINT();
|
||||
int16 CalcWIS();
|
||||
int16 CalcCHA();
|
||||
int32 CalcSTR();
|
||||
int32 CalcSTA();
|
||||
int32 CalcDEX();
|
||||
int32 CalcAGI();
|
||||
int32 CalcINT();
|
||||
int32 CalcWIS();
|
||||
int32 CalcCHA();
|
||||
|
||||
int16 CalcMR();
|
||||
int16 CalcFR();
|
||||
int16 CalcDR();
|
||||
int16 CalcPR();
|
||||
int16 CalcCR();
|
||||
int16 CalcCorrup();
|
||||
int32 CalcMR();
|
||||
int32 CalcFR();
|
||||
int32 CalcDR();
|
||||
int32 CalcPR();
|
||||
int32 CalcCR();
|
||||
int32 CalcCorrup();
|
||||
int32 CalcMaxHP();
|
||||
int32 CalcBaseHP();
|
||||
int32 GetClassHPFactor();
|
||||
@ -335,23 +335,23 @@ private:
|
||||
|
||||
// Private "base stats" Members
|
||||
int32 base_mana;
|
||||
int _baseAC;
|
||||
uint16 _baseSTR;
|
||||
uint16 _baseSTA;
|
||||
uint16 _baseDEX;
|
||||
uint16 _baseAGI;
|
||||
uint16 _baseINT;
|
||||
uint16 _baseWIS;
|
||||
uint16 _baseCHA;
|
||||
uint16 _baseATK;
|
||||
uint16 _baseRace; // Necessary to preserve the race otherwise mercs get their race updated in the db when they get an illusion.
|
||||
int32 _baseAC;
|
||||
uint32 _baseSTR;
|
||||
uint32 _baseSTA;
|
||||
uint32 _baseDEX;
|
||||
uint32 _baseAGI;
|
||||
uint32 _baseINT;
|
||||
uint32 _baseWIS;
|
||||
uint32 _baseCHA;
|
||||
uint32 _baseATK;
|
||||
uint32 _baseRace; // Necessary to preserve the race otherwise mercs get their race updated in the db when they get an illusion.
|
||||
uint8 _baseGender; // Merc gender. Necessary to preserve the original value otherwise it can be changed by illusions.
|
||||
uint16 _baseMR;
|
||||
uint16 _baseCR;
|
||||
uint16 _baseDR;
|
||||
uint16 _baseFR;
|
||||
uint16 _basePR;
|
||||
uint16 _baseCorrup;
|
||||
uint32 _baseMR;
|
||||
uint32 _baseCR;
|
||||
uint32 _baseDR;
|
||||
uint32 _baseFR;
|
||||
uint32 _basePR;
|
||||
uint32 _baseCorrup;
|
||||
uint32 RestRegenHP;
|
||||
uint32 RestRegenMana;
|
||||
uint32 RestRegenEndurance;
|
||||
|
||||
88
zone/mob.h
88
zone/mob.h
@ -343,36 +343,36 @@ public:
|
||||
inline virtual int32 GetAC() const { return AC + itembonuses.AC + spellbonuses.AC; }
|
||||
inline virtual int32 GetATK() const { return ATK + itembonuses.ATK + spellbonuses.ATK; }
|
||||
inline virtual int32 GetATKBonus() const { return itembonuses.ATK + spellbonuses.ATK; }
|
||||
inline virtual int16 GetSTR() const { return STR + itembonuses.STR + spellbonuses.STR; }
|
||||
inline virtual int16 GetSTA() const { return STA + itembonuses.STA + spellbonuses.STA; }
|
||||
inline virtual int16 GetDEX() const { return DEX + itembonuses.DEX + spellbonuses.DEX; }
|
||||
inline virtual int16 GetAGI() const { return AGI + itembonuses.AGI + spellbonuses.AGI; }
|
||||
inline virtual int16 GetINT() const { return INT + itembonuses.INT + spellbonuses.INT; }
|
||||
inline virtual int16 GetWIS() const { return WIS + itembonuses.WIS + spellbonuses.WIS; }
|
||||
inline virtual int16 GetCHA() const { return CHA + itembonuses.CHA + spellbonuses.CHA; }
|
||||
inline virtual int16 GetMR() const { return MR + itembonuses.MR + spellbonuses.MR; }
|
||||
inline virtual int16 GetFR() const { return FR + itembonuses.FR + spellbonuses.FR; }
|
||||
inline virtual int16 GetDR() const { return DR + itembonuses.DR + spellbonuses.DR; }
|
||||
inline virtual int16 GetPR() const { return PR + itembonuses.PR + spellbonuses.PR; }
|
||||
inline virtual int16 GetCR() const { return CR + itembonuses.CR + spellbonuses.CR; }
|
||||
inline virtual int16 GetCorrup() const { return Corrup + itembonuses.Corrup + spellbonuses.Corrup; }
|
||||
inline virtual int16 GetPhR() const { return PhR; }
|
||||
inline virtual int32 GetSTR() const { return STR + itembonuses.STR + spellbonuses.STR; }
|
||||
inline virtual int32 GetSTA() const { return STA + itembonuses.STA + spellbonuses.STA; }
|
||||
inline virtual int32 GetDEX() const { return DEX + itembonuses.DEX + spellbonuses.DEX; }
|
||||
inline virtual int32 GetAGI() const { return AGI + itembonuses.AGI + spellbonuses.AGI; }
|
||||
inline virtual int32 GetINT() const { return INT + itembonuses.INT + spellbonuses.INT; }
|
||||
inline virtual int32 GetWIS() const { return WIS + itembonuses.WIS + spellbonuses.WIS; }
|
||||
inline virtual int32 GetCHA() const { return CHA + itembonuses.CHA + spellbonuses.CHA; }
|
||||
inline virtual int32 GetMR() const { return MR + itembonuses.MR + spellbonuses.MR; }
|
||||
inline virtual int32 GetFR() const { return FR + itembonuses.FR + spellbonuses.FR; }
|
||||
inline virtual int32 GetDR() const { return DR + itembonuses.DR + spellbonuses.DR; }
|
||||
inline virtual int32 GetPR() const { return PR + itembonuses.PR + spellbonuses.PR; }
|
||||
inline virtual int32 GetCR() const { return CR + itembonuses.CR + spellbonuses.CR; }
|
||||
inline virtual int32 GetCorrup() const { return Corrup + itembonuses.Corrup + spellbonuses.Corrup; }
|
||||
inline virtual int32 GetPhR() const { return PhR; }
|
||||
inline StatBonuses GetItemBonuses() const { return itembonuses; }
|
||||
inline StatBonuses GetSpellBonuses() const { return spellbonuses; }
|
||||
inline StatBonuses GetAABonuses() const { return aabonuses; }
|
||||
inline virtual int16 GetMaxSTR() const { return GetSTR(); }
|
||||
inline virtual int16 GetMaxSTA() const { return GetSTA(); }
|
||||
inline virtual int16 GetMaxDEX() const { return GetDEX(); }
|
||||
inline virtual int16 GetMaxAGI() const { return GetAGI(); }
|
||||
inline virtual int16 GetMaxINT() const { return GetINT(); }
|
||||
inline virtual int16 GetMaxWIS() const { return GetWIS(); }
|
||||
inline virtual int16 GetMaxCHA() const { return GetCHA(); }
|
||||
inline virtual int16 GetMaxMR() const { return 255; }
|
||||
inline virtual int16 GetMaxPR() const { return 255; }
|
||||
inline virtual int16 GetMaxDR() const { return 255; }
|
||||
inline virtual int16 GetMaxCR() const { return 255; }
|
||||
inline virtual int16 GetMaxFR() const { return 255; }
|
||||
inline virtual int16 GetDelayDeath() const { return 0; }
|
||||
inline virtual int32 GetMaxSTR() const { return GetSTR(); }
|
||||
inline virtual int32 GetMaxSTA() const { return GetSTA(); }
|
||||
inline virtual int32 GetMaxDEX() const { return GetDEX(); }
|
||||
inline virtual int32 GetMaxAGI() const { return GetAGI(); }
|
||||
inline virtual int32 GetMaxINT() const { return GetINT(); }
|
||||
inline virtual int32 GetMaxWIS() const { return GetWIS(); }
|
||||
inline virtual int32 GetMaxCHA() const { return GetCHA(); }
|
||||
inline virtual int32 GetMaxMR() const { return 255; }
|
||||
inline virtual int32 GetMaxPR() const { return 255; }
|
||||
inline virtual int32 GetMaxDR() const { return 255; }
|
||||
inline virtual int32 GetMaxCR() const { return 255; }
|
||||
inline virtual int32 GetMaxFR() const { return 255; }
|
||||
inline virtual int32 GetDelayDeath() const { return 0; }
|
||||
inline int32 GetHP() const { return cur_hp; }
|
||||
inline int32 GetMaxHP() const { return max_hp; }
|
||||
virtual int32 CalcMaxHP();
|
||||
@ -697,7 +697,7 @@ public:
|
||||
bool CanThisClassBlock(void) const;
|
||||
|
||||
int GetMonkHandToHandDelay(void);
|
||||
uint16 GetClassLevelFactor();
|
||||
uint32 GetClassLevelFactor();
|
||||
void Mesmerize();
|
||||
inline bool IsMezzed() const { return mezzed; }
|
||||
inline bool IsStunned() const { return stunned; }
|
||||
@ -818,7 +818,7 @@ public:
|
||||
virtual int32 CheckHealAggroAmount(uint16 spell_id, uint32 heal_possible = 0);
|
||||
virtual uint32 GetAA(uint32 aa_id) const { return(0); }
|
||||
|
||||
uint16 GetInstrumentMod(uint16 spell_id) const;
|
||||
uint32 GetInstrumentMod(uint16 spell_id) const;
|
||||
int CalcSpellEffectValue(uint16 spell_id, int effect_id, int caster_level = 1, Mob *caster = nullptr, int ticsremaining = 0);
|
||||
int CalcSpellEffectValue_formula(int formula, int base, int max, int caster_level, uint16 spell_id, int ticsremaining = 0);
|
||||
virtual int CheckStackConflict(uint16 spellid1, int caster_level1, uint16 spellid2, int caster_level2, Mob* caster1 = nullptr, Mob* caster2 = nullptr, int buffslot = -1);
|
||||
@ -932,21 +932,21 @@ protected:
|
||||
uint8 helmtexture;
|
||||
|
||||
int AC;
|
||||
int16 ATK;
|
||||
int16 STR;
|
||||
int16 STA;
|
||||
int16 DEX;
|
||||
int16 AGI;
|
||||
int16 INT;
|
||||
int16 WIS;
|
||||
int16 CHA;
|
||||
int16 MR;
|
||||
int16 CR;
|
||||
int16 FR;
|
||||
int16 DR;
|
||||
int16 PR;
|
||||
int16 Corrup;
|
||||
int16 PhR;
|
||||
int32 ATK;
|
||||
int32 STR;
|
||||
int32 STA;
|
||||
int32 DEX;
|
||||
int32 AGI;
|
||||
int32 INT;
|
||||
int32 WIS;
|
||||
int32 CHA;
|
||||
int32 MR;
|
||||
int32 CR;
|
||||
int32 FR;
|
||||
int32 DR;
|
||||
int32 PR;
|
||||
int32 Corrup;
|
||||
int32 PhR;
|
||||
bool moving;
|
||||
int targeted;
|
||||
bool findable;
|
||||
|
||||
@ -2098,7 +2098,7 @@ void NPC::CalcNPCDamage() {
|
||||
max_dmg = (GetLevel()*2)*AC_adjust/10;
|
||||
}
|
||||
|
||||
int clfact = GetClassLevelFactor();
|
||||
int32 clfact = GetClassLevelFactor();
|
||||
min_dmg = (min_dmg * clfact) / 220;
|
||||
max_dmg = (max_dmg * clfact) / 220;
|
||||
|
||||
|
||||
@ -2536,7 +2536,7 @@ XS(XS_Mob_GetAC)
|
||||
Perl_croak(aTHX_ "Usage: Mob::GetAC(THIS)");
|
||||
{
|
||||
Mob * THIS;
|
||||
uint16 RETVAL;
|
||||
uint32 RETVAL;
|
||||
dXSTARG;
|
||||
|
||||
if (sv_derived_from(ST(0), "Mob")) {
|
||||
@ -2562,7 +2562,7 @@ XS(XS_Mob_GetATK)
|
||||
Perl_croak(aTHX_ "Usage: Mob::GetATK(THIS)");
|
||||
{
|
||||
Mob * THIS;
|
||||
uint16 RETVAL;
|
||||
uint32 RETVAL;
|
||||
dXSTARG;
|
||||
|
||||
if (sv_derived_from(ST(0), "Mob")) {
|
||||
@ -2588,7 +2588,7 @@ XS(XS_Mob_GetSTR)
|
||||
Perl_croak(aTHX_ "Usage: Mob::GetSTR(THIS)");
|
||||
{
|
||||
Mob * THIS;
|
||||
int16 RETVAL;
|
||||
int32 RETVAL;
|
||||
dXSTARG;
|
||||
|
||||
if (sv_derived_from(ST(0), "Mob")) {
|
||||
@ -2614,7 +2614,7 @@ XS(XS_Mob_GetSTA)
|
||||
Perl_croak(aTHX_ "Usage: Mob::GetSTA(THIS)");
|
||||
{
|
||||
Mob * THIS;
|
||||
int16 RETVAL;
|
||||
int32 RETVAL;
|
||||
dXSTARG;
|
||||
|
||||
if (sv_derived_from(ST(0), "Mob")) {
|
||||
@ -2640,7 +2640,7 @@ XS(XS_Mob_GetDEX)
|
||||
Perl_croak(aTHX_ "Usage: Mob::GetDEX(THIS)");
|
||||
{
|
||||
Mob * THIS;
|
||||
int16 RETVAL;
|
||||
int32 RETVAL;
|
||||
dXSTARG;
|
||||
|
||||
if (sv_derived_from(ST(0), "Mob")) {
|
||||
@ -2666,7 +2666,7 @@ XS(XS_Mob_GetAGI)
|
||||
Perl_croak(aTHX_ "Usage: Mob::GetAGI(THIS)");
|
||||
{
|
||||
Mob * THIS;
|
||||
int16 RETVAL;
|
||||
int32 RETVAL;
|
||||
dXSTARG;
|
||||
|
||||
if (sv_derived_from(ST(0), "Mob")) {
|
||||
@ -2692,7 +2692,7 @@ XS(XS_Mob_GetINT)
|
||||
Perl_croak(aTHX_ "Usage: Mob::GetINT(THIS)");
|
||||
{
|
||||
Mob * THIS;
|
||||
int16 RETVAL;
|
||||
int32 RETVAL;
|
||||
dXSTARG;
|
||||
|
||||
if (sv_derived_from(ST(0), "Mob")) {
|
||||
@ -2718,7 +2718,7 @@ XS(XS_Mob_GetWIS)
|
||||
Perl_croak(aTHX_ "Usage: Mob::GetWIS(THIS)");
|
||||
{
|
||||
Mob * THIS;
|
||||
int16 RETVAL;
|
||||
int32 RETVAL;
|
||||
dXSTARG;
|
||||
|
||||
if (sv_derived_from(ST(0), "Mob")) {
|
||||
@ -2744,7 +2744,7 @@ XS(XS_Mob_GetCHA)
|
||||
Perl_croak(aTHX_ "Usage: Mob::GetCHA(THIS)");
|
||||
{
|
||||
Mob * THIS;
|
||||
int16 RETVAL;
|
||||
int32 RETVAL;
|
||||
dXSTARG;
|
||||
|
||||
if (sv_derived_from(ST(0), "Mob")) {
|
||||
@ -2770,7 +2770,7 @@ XS(XS_Mob_GetMR)
|
||||
Perl_croak(aTHX_ "Usage: Mob::GetMR(THIS)");
|
||||
{
|
||||
Mob * THIS;
|
||||
int16 RETVAL;
|
||||
int32 RETVAL;
|
||||
dXSTARG;
|
||||
|
||||
if (sv_derived_from(ST(0), "Mob")) {
|
||||
@ -2796,7 +2796,7 @@ XS(XS_Mob_GetFR)
|
||||
Perl_croak(aTHX_ "Usage: Mob::GetFR(THIS)");
|
||||
{
|
||||
Mob * THIS;
|
||||
int16 RETVAL;
|
||||
int32 RETVAL;
|
||||
dXSTARG;
|
||||
|
||||
if (sv_derived_from(ST(0), "Mob")) {
|
||||
@ -2822,7 +2822,7 @@ XS(XS_Mob_GetDR)
|
||||
Perl_croak(aTHX_ "Usage: Mob::GetDR(THIS)");
|
||||
{
|
||||
Mob * THIS;
|
||||
int16 RETVAL;
|
||||
int32 RETVAL;
|
||||
dXSTARG;
|
||||
|
||||
if (sv_derived_from(ST(0), "Mob")) {
|
||||
@ -2848,7 +2848,7 @@ XS(XS_Mob_GetPR)
|
||||
Perl_croak(aTHX_ "Usage: Mob::GetPR(THIS)");
|
||||
{
|
||||
Mob * THIS;
|
||||
int16 RETVAL;
|
||||
int32 RETVAL;
|
||||
dXSTARG;
|
||||
|
||||
if (sv_derived_from(ST(0), "Mob")) {
|
||||
@ -2874,7 +2874,7 @@ XS(XS_Mob_GetCR)
|
||||
Perl_croak(aTHX_ "Usage: Mob::GetCR(THIS)");
|
||||
{
|
||||
Mob * THIS;
|
||||
int16 RETVAL;
|
||||
int32 RETVAL;
|
||||
dXSTARG;
|
||||
|
||||
if (sv_derived_from(ST(0), "Mob")) {
|
||||
@ -2900,7 +2900,7 @@ XS(XS_Mob_GetCorruption)
|
||||
Perl_croak(aTHX_ "Usage: Mob::GetCorruption(THIS)");
|
||||
{
|
||||
Mob * THIS;
|
||||
int16 RETVAL;
|
||||
int32 RETVAL;
|
||||
dXSTARG;
|
||||
|
||||
if (sv_derived_from(ST(0), "Mob")) {
|
||||
@ -2926,7 +2926,7 @@ XS(XS_Mob_GetMaxSTR)
|
||||
Perl_croak(aTHX_ "Usage: Mob::GetMaxSTR(THIS)");
|
||||
{
|
||||
Mob * THIS;
|
||||
int16 RETVAL;
|
||||
int32 RETVAL;
|
||||
dXSTARG;
|
||||
|
||||
if (sv_derived_from(ST(0), "Mob")) {
|
||||
@ -2952,7 +2952,7 @@ XS(XS_Mob_GetMaxSTA)
|
||||
Perl_croak(aTHX_ "Usage: Mob::GetMaxSTA(THIS)");
|
||||
{
|
||||
Mob * THIS;
|
||||
int16 RETVAL;
|
||||
int32 RETVAL;
|
||||
dXSTARG;
|
||||
|
||||
if (sv_derived_from(ST(0), "Mob")) {
|
||||
@ -2978,7 +2978,7 @@ XS(XS_Mob_GetMaxDEX)
|
||||
Perl_croak(aTHX_ "Usage: Mob::GetMaxDEX(THIS)");
|
||||
{
|
||||
Mob * THIS;
|
||||
int16 RETVAL;
|
||||
int32 RETVAL;
|
||||
dXSTARG;
|
||||
|
||||
if (sv_derived_from(ST(0), "Mob")) {
|
||||
@ -3004,7 +3004,7 @@ XS(XS_Mob_GetMaxAGI)
|
||||
Perl_croak(aTHX_ "Usage: Mob::GetMaxAGI(THIS)");
|
||||
{
|
||||
Mob * THIS;
|
||||
int16 RETVAL;
|
||||
int32 RETVAL;
|
||||
dXSTARG;
|
||||
|
||||
if (sv_derived_from(ST(0), "Mob")) {
|
||||
@ -3030,7 +3030,7 @@ XS(XS_Mob_GetMaxINT)
|
||||
Perl_croak(aTHX_ "Usage: Mob::GetMaxINT(THIS)");
|
||||
{
|
||||
Mob * THIS;
|
||||
int16 RETVAL;
|
||||
int32 RETVAL;
|
||||
dXSTARG;
|
||||
|
||||
if (sv_derived_from(ST(0), "Mob")) {
|
||||
@ -3056,7 +3056,7 @@ XS(XS_Mob_GetMaxWIS)
|
||||
Perl_croak(aTHX_ "Usage: Mob::GetMaxWIS(THIS)");
|
||||
{
|
||||
Mob * THIS;
|
||||
int16 RETVAL;
|
||||
int32 RETVAL;
|
||||
dXSTARG;
|
||||
|
||||
if (sv_derived_from(ST(0), "Mob")) {
|
||||
@ -3082,7 +3082,7 @@ XS(XS_Mob_GetMaxCHA)
|
||||
Perl_croak(aTHX_ "Usage: Mob::GetMaxCHA(THIS)");
|
||||
{
|
||||
Mob * THIS;
|
||||
int16 RETVAL;
|
||||
int32 RETVAL;
|
||||
dXSTARG;
|
||||
|
||||
if (sv_derived_from(ST(0), "Mob")) {
|
||||
@ -6259,7 +6259,7 @@ XS(XS_Mob_CheckAggroAmount)
|
||||
Perl_croak(aTHX_ "Usage: Mob::CheckAggroAmount(THIS, spellid)");
|
||||
{
|
||||
Mob * THIS;
|
||||
uint16 RETVAL;
|
||||
uint32 RETVAL;
|
||||
dXSTARG;
|
||||
uint16 spellid = (uint16)SvUV(ST(1));
|
||||
|
||||
@ -6286,7 +6286,7 @@ XS(XS_Mob_CheckHealAggroAmount)
|
||||
Perl_croak(aTHX_ "Usage: Mob::CheckHealAggroAmount(THIS, spellid, possible_heal_amt)");
|
||||
{
|
||||
Mob * THIS;
|
||||
uint16 RETVAL;
|
||||
uint32 RETVAL;
|
||||
dXSTARG;
|
||||
uint16 spellid = (uint16)SvUV(ST(1));
|
||||
uint32 possible = 0;
|
||||
|
||||
@ -60,23 +60,23 @@ struct NPCType
|
||||
uint32 adventure_template;
|
||||
uint32 trap_template;
|
||||
uint8 light; //not loaded from DB
|
||||
uint16 AC;
|
||||
uint32 AC;
|
||||
uint32 Mana; //not loaded from DB
|
||||
uint16 ATK; //not loaded from DB
|
||||
uint16 STR;
|
||||
uint16 STA;
|
||||
uint16 DEX;
|
||||
uint16 AGI;
|
||||
uint16 INT;
|
||||
uint16 WIS;
|
||||
uint16 CHA;
|
||||
int16 MR;
|
||||
int16 FR;
|
||||
int16 CR;
|
||||
int16 PR;
|
||||
int16 DR;
|
||||
int16 Corrup;
|
||||
int16 PhR;
|
||||
uint32 ATK; //not loaded from DB
|
||||
uint32 STR;
|
||||
uint32 STA;
|
||||
uint32 DEX;
|
||||
uint32 AGI;
|
||||
uint32 INT;
|
||||
uint32 WIS;
|
||||
uint32 CHA;
|
||||
int32 MR;
|
||||
int32 FR;
|
||||
int32 CR;
|
||||
int32 PR;
|
||||
int32 DR;
|
||||
int32 Corrup;
|
||||
int32 PhR;
|
||||
uint8 haircolor;
|
||||
uint8 beardcolor;
|
||||
uint8 eyecolor1; // the eyecolors always seem to be the same, maybe left and right eye?
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user