Converted SkillType typedef enumeration to SkillUseTypes enumeration

This commit is contained in:
Uleat
2013-10-27 13:03:41 -04:00
parent 3e6be197e6
commit e3805d5920
43 changed files with 1119 additions and 949 deletions
+100 -100
View File
@@ -1251,19 +1251,19 @@ void Bot::GenerateArmorClass()
{
/// new formula
int avoidance = 0;
avoidance = (acmod() + ((GetSkill(DEFENSE)*16)/9));
avoidance = (acmod() + ((GetSkill(SkillDefense)*16)/9));
if(avoidance < 0)
avoidance = 0;
int mitigation = 0;
if(GetClass() == WIZARD || GetClass() == MAGICIAN || GetClass() == NECROMANCER || GetClass() == ENCHANTER)
{
mitigation = GetSkill(DEFENSE)/4 + (itembonuses.AC+1);
mitigation = GetSkill(SkillDefense)/4 + (itembonuses.AC+1);
mitigation -= 4;
}
else
{
mitigation = GetSkill(DEFENSE)/3 + ((itembonuses.AC*4)/3);
mitigation = GetSkill(SkillDefense)/3 + ((itembonuses.AC*4)/3);
if(GetClass() == MONK)
mitigation += GetLevel() * 13/10; //the 13/10 might be wrong, but it is close...
}
@@ -1290,12 +1290,12 @@ void Bot::GenerateArmorClass()
uint16 Bot::GetPrimarySkillValue()
{
SkillType skill = HIGHEST_SKILL; //because nullptr == 0, which is 1H Slashing, & we want it to return 0 from GetSkill
SkillUseTypes skill = HIGHEST_SKILL; //because nullptr == 0, which is 1H Slashing, & we want it to return 0 from GetSkill
bool equiped = m_inv.GetItem(SLOT_PRIMARY);
if(!equiped)
{
skill = HAND_TO_HAND;
skill = SkillHandtoHand;
}
else
{
@@ -1304,42 +1304,42 @@ uint16 Bot::GetPrimarySkillValue()
{
case ItemType1HSlash: // 1H Slashing
{
skill = _1H_SLASHING;
skill = Skill1HSlashing;
break;
}
case ItemType2HSlash: // 2H Slashing
{
skill = _2H_SLASHING;
skill = Skill2HSlashing;
break;
}
case ItemType1HPiercing: // Piercing
{
skill = PIERCING;
skill = Skill1HPiercing;
break;
}
case ItemType1HBlunt: // 1H Blunt
{
skill = _1H_BLUNT;
skill = Skill1HBlunt;
break;
}
case ItemType2HBlunt: // 2H Blunt
{
skill = _2H_BLUNT;
skill = Skill2HBlunt;
break;
}
case ItemType2HPiercing: // 2H Piercing
{
skill = PIERCING;
skill = Skill1HPiercing; // change to Skill2HPiercing once activated
break;
}
case ItemTypeMartial: // Hand to Hand
{
skill = HAND_TO_HAND;
skill = SkillHandtoHand;
break;
}
default: // All other types default to Hand to Hand
{
skill = HAND_TO_HAND;
skill = SkillHandtoHand;
break;
}
}
@@ -1348,7 +1348,7 @@ uint16 Bot::GetPrimarySkillValue()
return GetSkill(skill);
}
uint16 Bot::MaxSkill(SkillType skillid, uint16 class_, uint16 level) const {
uint16 Bot::MaxSkill(SkillUseTypes skillid, uint16 class_, uint16 level) const {
return(database.GetSkillCap(class_, skillid, level));
}
@@ -1358,7 +1358,7 @@ uint16 Bot::GetTotalATK()
uint16 WornCap = itembonuses.ATK;
if(IsBot()) {
AttackRating = ((WornCap * 1.342) + (GetSkill(OFFENSE) * 1.345) + ((GetSTR() - 66) * 0.9) + (GetPrimarySkillValue() * 2.69));
AttackRating = ((WornCap * 1.342) + (GetSkill(SkillOffense) * 1.345) + ((GetSTR() - 66) * 0.9) + (GetPrimarySkillValue() * 2.69));
AttackRating += aabonuses.ATK + GroupLeadershipAAOffenseEnhancement();
if (AttackRating < 10)
@@ -1376,7 +1376,7 @@ uint16 Bot::GetATKRating()
{
uint16 AttackRating = 0;
if(IsBot()) {
AttackRating = (GetSkill(OFFENSE) * 1.345) + ((GetSTR() - 66) * 0.9) + (GetPrimarySkillValue() * 2.69);
AttackRating = (GetSkill(SkillOffense) * 1.345) + ((GetSTR() - 66) * 0.9) + (GetPrimarySkillValue() * 2.69);
if (AttackRating < 10)
AttackRating = 10;
@@ -3206,7 +3206,7 @@ void Bot::BotRangedAttack(Mob* other) {
return;
}
SendItemAnimation(other, Ammo, ARCHERY);
SendItemAnimation(other, Ammo, SkillArchery);
DoArcheryAttackDmg(GetTarget(), rangedItem, ammoItem);
@@ -3248,13 +3248,13 @@ bool Bot::CheckBotDoubleAttack(bool tripleAttack) {
uint16 bonusGiveDA = aabonuses.GiveDoubleAttack + spellbonuses.GiveDoubleAttack + itembonuses.GiveDoubleAttack;
// If you don't have the double attack skill, return
if(!GetSkill(DOUBLE_ATTACK) && !(GetClass() == BARD || GetClass() == BEASTLORD))
if(!GetSkill(SkillDoubleAttack) && !(GetClass() == BARD || GetClass() == BEASTLORD))
return false;
// You start with no chance of double attacking
float chance = 0.0f;
uint16 skill = GetSkill(DOUBLE_ATTACK);
uint16 skill = GetSkill(SkillDoubleAttack);
int16 bonusDA = aabonuses.DoubleAttackChance + spellbonuses.DoubleAttackChance + itembonuses.DoubleAttackChance;
@@ -3281,15 +3281,15 @@ bool Bot::CheckBotDoubleAttack(bool tripleAttack) {
return false;
}
void Bot::DoMeleeSkillAttackDmg(Mob* other, uint16 weapon_damage, SkillType skillinuse, int16 chance_mod, int16 focus, bool CanRiposte)
void Bot::DoMeleeSkillAttackDmg(Mob* other, uint16 weapon_damage, SkillUseTypes skillinuse, int16 chance_mod, int16 focus, bool CanRiposte)
{
if (!CanDoSpecialAttack(other))
return;
//For spells using skill value 98 (feral swipe ect) server sets this to 67 automatically.
//Kayen: This is unlikely to be completely accurate but use OFFENSE skill value for these effects.
if (skillinuse == BEGGING)
skillinuse = OFFENSE;
if (skillinuse == SkillBegging)
skillinuse = SkillOffense;
int damage = 0;
uint32 hate = 0;
@@ -3351,7 +3351,7 @@ void Bot::DoMeleeSkillAttackDmg(Mob* other, uint16 weapon_damage, SkillType skil
else
damage = -5;
if(skillinuse == BASH){
if(skillinuse == SkillBash){
const ItemInst* inst = GetBotItem(SLOT_SECONDARY);
const Item_Struct* botweapon = 0;
if(inst)
@@ -3367,8 +3367,8 @@ void Bot::DoMeleeSkillAttackDmg(Mob* other, uint16 weapon_damage, SkillType skil
other->AddToHateList(this, hate);
bool CanSkillProc = true;
if (skillinuse == OFFENSE){ //Hack to allow damage to display.
skillinuse = TIGER_CLAW; //'strike' your opponent - Arbitrary choice for message.
if (skillinuse == SkillOffense){ //Hack to allow damage to display.
skillinuse = SkillTigerClaw; //'strike' your opponent - Arbitrary choice for message.
CanSkillProc = false; //Disable skill procs
}
@@ -3377,7 +3377,7 @@ void Bot::DoMeleeSkillAttackDmg(Mob* other, uint16 weapon_damage, SkillType skil
if (HasDied())
return;
if((skillinuse == DRAGON_PUNCH) && GetAA(aaDragonPunch) && MakeRandomInt(0, 99) < 25){
if((skillinuse == SkillDragonPunch) && GetAA(aaDragonPunch) && MakeRandomInt(0, 99) < 25){
SpellFinished(904, other, 10, 0, -1, spells[904].ResistDiff);
other->Stun(100);
}
@@ -3388,26 +3388,26 @@ void Bot::DoMeleeSkillAttackDmg(Mob* other, uint16 weapon_damage, SkillType skil
}
}
void Bot::ApplySpecialAttackMod(SkillType skill, int32 &dmg, int32 &mindmg) {
void Bot::ApplySpecialAttackMod(SkillUseTypes skill, int32 &dmg, int32 &mindmg) {
int item_slot = -1;
//1: Apply bonus from AC (BOOT/SHIELD/HANDS) est. 40AC=6dmg
switch (skill){
case FLYING_KICK:
case ROUND_KICK:
case KICK:
case SkillFlyingKick:
case SkillRoundKick:
case SkillKick:
item_slot = SLOT_FEET;
break;
case BASH:
case SkillBash:
item_slot = SLOT_SECONDARY;
break;
case DRAGON_PUNCH:
case EAGLE_STRIKE:
case TIGER_CLAW:
case SkillDragonPunch:
case SkillEagleStrike:
case SkillTigerClaw:
item_slot = SLOT_HANDS;
break;
}
@@ -3847,7 +3847,7 @@ void Bot::AI_Process() {
float DualWieldProbability = 0.0f;
int16 Ambidexterity = aabonuses.Ambidexterity + spellbonuses.Ambidexterity + itembonuses.Ambidexterity;
DualWieldProbability = (GetSkill(DUAL_WIELD) + GetLevel() + Ambidexterity) / 400.0f; // 78.0 max
DualWieldProbability = (GetSkill(SkillDualWield) + GetLevel() + Ambidexterity) / 400.0f; // 78.0 max
int16 DWBonus = spellbonuses.DualWieldChance + itembonuses.DualWieldChance;
DualWieldProbability += DualWieldProbability*float(DWBonus)/ 100.0f;
@@ -4127,7 +4127,7 @@ void Bot::PetAIProcess() {
{
if(botPet->GetOwner()->GetLevel() >= 24)
{
float DualWieldProbability = (botPet->GetSkill(DUAL_WIELD) + botPet->GetLevel()) / 400.0f;
float DualWieldProbability = (botPet->GetSkill(SkillDualWield) + botPet->GetLevel()) / 400.0f;
DualWieldProbability -= MakeRandomFloat(0, 1);
if(DualWieldProbability < 0){
botPet->Attack(botPet->GetTarget(), 14);
@@ -6195,7 +6195,7 @@ void Bot::PerformTradeWithClient(int16 beginSlotID, int16 endSlotID, Client* cli
}
}
bool Bot::Death(Mob *killerMob, int32 damage, uint16 spell_id, SkillType attack_skill) {
bool Bot::Death(Mob *killerMob, int32 damage, uint16 spell_id, SkillUseTypes attack_skill) {
if(!NPC::Death(killerMob, damage, spell_id, attack_skill))
return false;
@@ -6300,7 +6300,7 @@ bool Bot::Death(Mob *killerMob, int32 damage, uint16 spell_id, SkillType attack_
return true;
}
void Bot::Damage(Mob *from, int32 damage, uint16 spell_id, SkillType attack_skill, bool avoidable, int8 buffslot, bool iBuffTic) {
void Bot::Damage(Mob *from, int32 damage, uint16 spell_id, SkillUseTypes attack_skill, bool avoidable, int8 buffslot, bool iBuffTic) {
if(spell_id==0)
spell_id = SPELL_UNKNOWN;
@@ -6425,7 +6425,7 @@ bool Bot::Attack(Mob* other, int Hand, bool FromRiposte, bool IsStrikethrough, b
// calculate attack_skill and skillinuse depending on hand and weapon
// also send Packet to near clients
SkillType skillinuse;
SkillUseTypes skillinuse;
AttackAnimation(skillinuse, Hand, weapon);
mlog(COMBAT__ATTACKS, "Attacking with %s in slot %d using skill %d", weapon?weapon->GetItem()->Name:"Fist", Hand, skillinuse);
@@ -7828,7 +7828,7 @@ bool Bot::AvoidDamage(Mob* other, int32 &damage, bool CanRiposte)
if (CanRiposte && damage > 0 && CanThisClassRiposte() && !other->BehindMob(this, other->GetX(), other->GetY()))
{
riposte_chance = (100.0f + (float)defender->GetAABonuses().RiposteChance + (float)defender->GetSpellBonuses().RiposteChance + (float)defender->GetItemBonuses().RiposteChance) / 100.0f;
skill = GetSkill(RIPOSTE);
skill = GetSkill(SkillRiposte);
if (!ghit) { //if they are not using a garunteed hit discipline
bonus = 2.0 + skill/60.0 + (GetDEX()/200);
@@ -7864,7 +7864,7 @@ bool Bot::AvoidDamage(Mob* other, int32 &damage, bool CanRiposte)
float block_chance = 0.0f;
if (damage > 0 && CanThisClassBlock() && (!other->BehindMob(this, other->GetX(), other->GetY()) || bBlockFromRear)) {
block_chance = (100.0f + (float)spellbonuses.IncreaseBlockChance + (float)itembonuses.IncreaseBlockChance) / 100.0f;
skill = GetSkill(BLOCKSKILL);
skill = GetSkill(SkillBlock);
if (!ghit) { //if they are not using a garunteed hit discipline
bonus = 2.0 + skill/35.0 + (GetDEX()/200);
@@ -7912,7 +7912,7 @@ bool Bot::AvoidDamage(Mob* other, int32 &damage, bool CanRiposte)
if (damage > 0 && CanThisClassParry() && !other->BehindMob(this, other->GetX(), other->GetY()))
{
parry_chance = (100.0f + (float)defender->GetSpellBonuses().ParryChance + (float)defender->GetItemBonuses().ParryChance) / 100.0f;
skill = GetSkill(PARRY);
skill = GetSkill(SkillParry);
if (!ghit) { //if they are not using a garunteed hit discipline
bonus = 2.0 + skill/60.0 + (GetDEX()/200);
@@ -7931,7 +7931,7 @@ bool Bot::AvoidDamage(Mob* other, int32 &damage, bool CanRiposte)
if (damage > 0 && CanThisClassDodge() && !other->BehindMob(this, other->GetX(), other->GetY()))
{
dodge_chance = (100.0f + (float)defender->GetSpellBonuses().DodgeChance + (float)defender->GetItemBonuses().DodgeChance) / 100.0f;
skill = GetSkill(DODGE);
skill = GetSkill(SkillDodge);
if (!ghit) { //if they are not using a garunteed hit discipline
bonus = 2.0 + skill/60.0 + (GetAGI()/200);
@@ -8001,7 +8001,7 @@ int Bot::GetMonkHandToHandDamage(void)
return damage[Level];
}
bool Bot::TryFinishingBlow(Mob *defender, SkillType skillinuse)
bool Bot::TryFinishingBlow(Mob *defender, SkillUseTypes skillinuse)
{
if (!defender)
return false;
@@ -8058,7 +8058,7 @@ void Bot::DoRiposte(Mob* defender) {
}
}
void Bot::DoSpecialAttackDamage(Mob *who, SkillType skill, int32 max_damage, int32 min_damage, int32 hate_override,int ReuseTime, bool HitChance) {
void Bot::DoSpecialAttackDamage(Mob *who, SkillUseTypes skill, int32 max_damage, int32 min_damage, int32 hate_override,int ReuseTime, bool HitChance) {
//this really should go through the same code as normal melee damage to
//pick up all the special behavior there
@@ -8066,7 +8066,7 @@ void Bot::DoSpecialAttackDamage(Mob *who, SkillType skill, int32 max_damage, int
if(hate_override > -1)
hate = hate_override;
if(skill == BASH) {
if(skill == SkillBash) {
const ItemInst* inst = GetBotItem(SLOT_SECONDARY);
const Item_Struct* botweapon = 0;
if(inst)
@@ -8086,7 +8086,7 @@ void Bot::DoSpecialAttackDamage(Mob *who, SkillType skill, int32 max_damage, int
else{
bool CanRiposte = true;
if(skill == THROWING || skill == ARCHERY) // changed from '&&'
if(skill == SkillThrowing || skill == SkillArchery) // changed from '&&'
CanRiposte = false;
who->AvoidDamage(this, max_damage, CanRiposte);
@@ -8175,7 +8175,7 @@ void Bot::TryBackstab(Mob *other, int ReuseTime) {
else {
RogueBackstab(other);
if (level > 54) {
float DoubleAttackProbability = (GetSkill(DOUBLE_ATTACK) + GetLevel()) / 500.0f; // 62.4 max
float DoubleAttackProbability = (GetSkill(SkillDoubleAttack) + GetLevel()) / 500.0f; // 62.4 max
// Check for double attack with main hand assuming maxed DA Skill (MS)
if(MakeRandomFloat(0, 1) < DoubleAttackProbability) // Max 62.4 % chance of DA
@@ -8195,7 +8195,7 @@ void Bot::TryBackstab(Mob *other, int ReuseTime) {
//we can stab from any angle, we do min damage though.
RogueBackstab(other, true);
if (level > 54) {
float DoubleAttackProbability = (GetSkill(DOUBLE_ATTACK) + GetLevel()) / 500.0f; // 62.4 max
float DoubleAttackProbability = (GetSkill(SkillDoubleAttack) + GetLevel()) / 500.0f; // 62.4 max
// Check for double attack with main hand assuming maxed DA Skill (MS)
if(MakeRandomFloat(0, 1) < DoubleAttackProbability) // Max 62.4 % chance of DA
if(other->GetHP() > 0)
@@ -8241,12 +8241,12 @@ void Bot::RogueBackstab(Mob* other, bool min_damage, int ReuseTime)
if(primaryweapondamage > 0){
if(level > 25){
max_hit = (((2*backstab_dmg) * GetDamageTable(BACKSTAB) / 100) * 10 * GetSkill(BACKSTAB) / 355) + ((level-25)/3) + 1;
hate = 20 * backstab_dmg * GetSkill(BACKSTAB) / 355;
max_hit = (((2*backstab_dmg) * GetDamageTable(SkillBackstab) / 100) * 10 * GetSkill(SkillBackstab) / 355) + ((level-25)/3) + 1;
hate = 20 * backstab_dmg * GetSkill(SkillBackstab) / 355;
}
else{
max_hit = (((2*backstab_dmg) * GetDamageTable(BACKSTAB) / 100) * 10 * GetSkill(BACKSTAB) / 355) + 1;
hate = 20 * backstab_dmg * GetSkill(BACKSTAB) / 355;
max_hit = (((2*backstab_dmg) * GetDamageTable(SkillBackstab) / 100) * 10 * GetSkill(SkillBackstab) / 355) + 1;
hate = 20 * backstab_dmg * GetSkill(SkillBackstab) / 355;
}
// determine minimum hits
@@ -8260,7 +8260,7 @@ void Bot::RogueBackstab(Mob* other, bool min_damage, int ReuseTime)
min_hit = (level * ( level*5 - 105)) / 100;
}
if(!other->CheckHitChance(this, BACKSTAB, 0)) {
if(!other->CheckHitChance(this, SkillBackstab, 0)) {
ndamage = 0;
}
else{
@@ -8284,7 +8284,7 @@ void Bot::RogueBackstab(Mob* other, bool min_damage, int ReuseTime)
ndamage = -5;
}
DoSpecialAttackDamage(other, BACKSTAB, ndamage, min_hit, hate, ReuseTime);
DoSpecialAttackDamage(other, SkillBackstab, ndamage, min_hit, hate, ReuseTime);
DoAnim(animPiercing);
}
@@ -8293,10 +8293,10 @@ void Bot::RogueAssassinate(Mob* other)
ItemInst* botweaponInst = GetBotItem(SLOT_PRIMARY);
if(botweaponInst) {
if(GetWeaponDamage(other, botweaponInst)) {
other->Damage(this, 32000, SPELL_UNKNOWN, BACKSTAB);
other->Damage(this, 32000, SPELL_UNKNOWN, SkillBackstab);
}
else {
other->Damage(this, -5, SPELL_UNKNOWN, BACKSTAB);
other->Damage(this, -5, SPELL_UNKNOWN, SkillBackstab);
}
}
@@ -8389,18 +8389,18 @@ void Bot::DoClassAttacks(Mob *target, bool IsRiposte) {
}
if(!canBash || MakeRandomInt(0, 100) > 25) { //tested on live, warrior mobs both kick and bash, kick about 75% of the time, casting doesn't seem to make a difference.
skill_to_use = KICK;
skill_to_use = SkillKick;
}
else {
skill_to_use = BASH;
skill_to_use = SkillBash;
}
}
case RANGER:
case BEASTLORD:
skill_to_use = KICK;
skill_to_use = SkillKick;
break;
case BERSERKER:
skill_to_use = FRENZY;
skill_to_use = SkillFrenzy;
break;
case CLERIC:
case SHADOWKNIGHT:
@@ -8412,38 +8412,38 @@ void Bot::DoClassAttacks(Mob *target, bool IsRiposte) {
|| m_inv.GetItem(SLOT_PRIMARY)->GetItem()->ItemType == ItemType2HBlunt
|| m_inv.GetItem(SLOT_PRIMARY)->GetItem()->ItemType == ItemType2HPiercing)
&& GetAA(aa2HandBash) >= 1)) { //Using 2 hand weapon, but has AA 2 Hand Bash
skill_to_use = BASH;
skill_to_use = SkillBash;
}
}
break;
case MONK:
if(GetLevel() >= 30)
{
skill_to_use = FLYING_KICK;
skill_to_use = SkillFlyingKick;
}
else if(GetLevel() >= 25)
{
skill_to_use = DRAGON_PUNCH;
skill_to_use = SkillDragonPunch;
}
else if(GetLevel() >= 20)
{
skill_to_use = EAGLE_STRIKE;
skill_to_use = SkillEagleStrike;
}
else if(GetLevel() >= 10)
{
skill_to_use = TIGER_CLAW;
skill_to_use = SkillTigerClaw;
}
else if(GetLevel() >= 5)
{
skill_to_use = ROUND_KICK;
skill_to_use = SkillRoundKick;
}
else
{
skill_to_use = KICK;
skill_to_use = SkillKick;
}
break;
case ROGUE:
skill_to_use = BACKSTAB;
skill_to_use = SkillBackstab;
break;
}
@@ -8451,7 +8451,7 @@ void Bot::DoClassAttacks(Mob *target, bool IsRiposte) {
return;
if(skill_to_use == BASH)
if(skill_to_use == SkillBash)
{
if (target!=this)
{
@@ -8462,7 +8462,7 @@ void Bot::DoClassAttacks(Mob *target, bool IsRiposte) {
dmg = -5;
}
else{
if(!target->CheckHitChance(this, BASH, 0)) {
if(!target->CheckHitChance(this, SkillBash, 0)) {
dmg = 0;
}
else{
@@ -8477,7 +8477,7 @@ void Bot::DoClassAttacks(Mob *target, bool IsRiposte) {
reuse = BashReuseTime * 1000;
//reuse = (reuse*HasteModifier)/100;
DoSpecialAttackDamage(target, BASH, dmg, 1,-1,reuse);
DoSpecialAttackDamage(target, SkillBash, dmg, 1,-1,reuse);
did_attack = true;
@@ -8488,13 +8488,13 @@ void Bot::DoClassAttacks(Mob *target, bool IsRiposte) {
}
}
if(skill_to_use == FRENZY)
if(skill_to_use == SkillFrenzy)
{
int AtkRounds = 3;
int skillmod = 0;
if(MaxSkill(FRENZY) > 0)
skillmod = 100*GetSkill(FRENZY)/MaxSkill(FRENZY);
if(MaxSkill(SkillFrenzy) > 0)
skillmod = 100*GetSkill(SkillFrenzy)/MaxSkill(SkillFrenzy);
int32 max_dmg = (26 + ((((GetLevel()-6) * 2)*skillmod)/100)) * ((100+RuleI(Combat, FrenzyBonus))/100);
int32 min_dmg = 0;
@@ -8517,7 +8517,7 @@ void Bot::DoClassAttacks(Mob *target, bool IsRiposte) {
while(AtkRounds > 0) {
if (GetTarget() && (AtkRounds == 1 || MakeRandomInt(0,100) < 75)){
DoSpecialAttackDamage(GetTarget(), FRENZY, max_dmg, min_dmg, max_dmg , reuse, true);
DoSpecialAttackDamage(GetTarget(), SkillFrenzy, max_dmg, min_dmg, max_dmg , reuse, true);
}
AtkRounds--;
}
@@ -8527,7 +8527,7 @@ void Bot::DoClassAttacks(Mob *target, bool IsRiposte) {
}
}
if(skill_to_use == KICK)
if(skill_to_use == SkillKick)
{
if(target!=this)
{
@@ -8537,7 +8537,7 @@ void Bot::DoClassAttacks(Mob *target, bool IsRiposte) {
dmg = -5;
}
else{
if(!target->CheckHitChance(this, KICK, 0)) {
if(!target->CheckHitChance(this, SkillKick, 0)) {
dmg = 0;
}
else{
@@ -8550,17 +8550,17 @@ void Bot::DoClassAttacks(Mob *target, bool IsRiposte) {
reuse = KickReuseTime * 1000;
DoSpecialAttackDamage(target, KICK, dmg, 1,-1, reuse);
DoSpecialAttackDamage(target, SkillKick, dmg, 1,-1, reuse);
did_attack = true;
}
}
if(skill_to_use == FLYING_KICK ||
skill_to_use == DRAGON_PUNCH ||
skill_to_use == EAGLE_STRIKE ||
skill_to_use == TIGER_CLAW ||
skill_to_use == ROUND_KICK)
if(skill_to_use == SkillFlyingKick ||
skill_to_use == SkillDragonPunch ||
skill_to_use == SkillEagleStrike ||
skill_to_use == SkillTigerClaw ||
skill_to_use == SkillRoundKick)
{
reuse = MonkSpecialAttack(target, skill_to_use) - 1;
MonkSpecialAttack(target, skill_to_use);
@@ -8569,7 +8569,7 @@ void Bot::DoClassAttacks(Mob *target, bool IsRiposte) {
uint16 bDoubleSpecialAttack = itembonuses.DoubleSpecialAttack + spellbonuses.DoubleSpecialAttack + aabonuses.DoubleSpecialAttack;
if( bDoubleSpecialAttack && (bDoubleSpecialAttack >= 100 || bDoubleSpecialAttack > MakeRandomInt(0,100))) {
int MonkSPA [5] = { FLYING_KICK, DRAGON_PUNCH, EAGLE_STRIKE, TIGER_CLAW, ROUND_KICK };
int MonkSPA [5] = { SkillFlyingKick, SkillDragonPunch, SkillEagleStrike, SkillTigerClaw, SkillRoundKick };
MonkSpecialAttack(target, MonkSPA[MakeRandomInt(0,4)]);
int TripleChance = 25;
@@ -8586,7 +8586,7 @@ void Bot::DoClassAttacks(Mob *target, bool IsRiposte) {
did_attack = true;
}
if(skill_to_use == BACKSTAB)
if(skill_to_use == SkillBackstab)
{
reuse = BackstabReuseTime * 1000;
did_attack = true;
@@ -8600,10 +8600,10 @@ void Bot::DoClassAttacks(Mob *target, bool IsRiposte) {
classattack_timer.Start(reuse*HasteModifier/100);
}
bool Bot::TryHeadShot(Mob* defender, SkillType skillInUse) {
bool Bot::TryHeadShot(Mob* defender, SkillUseTypes skillInUse) {
bool Result = false;
if(defender && (defender->GetBodyType() == BT_Humanoid) && (skillInUse == ARCHERY) && (GetClass() == RANGER) && (GetLevel() >= 62)) {
if(defender && (defender->GetBodyType() == BT_Humanoid) && (skillInUse == SkillArchery) && (GetClass() == RANGER) && (GetLevel() >= 62)) {
int defenderLevel = defender->GetLevel();
int rangerLevel = GetLevel();
// Bot Ranger Headshot AA through level 85(Underfoot)
@@ -9036,7 +9036,7 @@ void Bot::SetAttackTimer() {
}
//clients must have the skill to use it...
if(!GetSkill(DUAL_WIELD)) {
if(!GetSkill(SkillDualWield)) {
attack_dw_timer.Disable();
continue;
}
@@ -10610,7 +10610,7 @@ int32 Bot::CalcManaRegen()
{
BuffFadeBySitModifier();
if(botclass != WARRIOR && botclass != MONK && botclass != ROGUE && botclass != BERSERKER) {
regen = (((GetSkill(MEDITATE) / 10) + (level - (level / 4))) / 4) + 4;
regen = (((GetSkill(SkillMeditate) / 10) + (level - (level / 4))) / 4) + 4;
regen += spellbonuses.ManaRegen + itembonuses.ManaRegen;
}
else
@@ -11572,7 +11572,7 @@ void Bot::CalcBotStats(bool showtext) {
// Test Code
if(GetClass() == BARD)
GetBotOwner()->Message(15, "Bard Skills-- Brass: %i, Percussion: %i, Singing: %i, Stringed: %i, Wind: %i",
GetSkill(BRASS_INSTRUMENTS), GetSkill(PERCUSSION_INSTRUMENTS), GetSkill(SINGING), GetSkill(STRINGED_INSTRUMENTS), GetSkill(WIND_INSTRUMENTS));
GetSkill(SkillBrassInstruments), GetSkill(SkillPercussionInstruments), GetSkill(SkillSinging), GetSkill(SkillStringedInstruments), GetSkill(SkillWindInstruments));
}
/*if(this->Save())
@@ -11591,11 +11591,11 @@ void Bot::CalcBotStats(bool showtext) {
// Test Code
if(GetClass() == BARD) {
GetBotOwner()->Message(15, "Bard Skills-- Brass: %i, Percussion: %i, Singing: %i, Stringed: %i, Wind: %i",
GetSkill(BRASS_INSTRUMENTS) + GetBrassMod(),
GetSkill(PERCUSSION_INSTRUMENTS) + GetPercMod(),
GetSkill(SINGING) + GetSingMod(),
GetSkill(STRINGED_INSTRUMENTS) + GetStringMod(),
GetSkill(WIND_INSTRUMENTS) + GetWindMod());
GetSkill(SkillBrassInstruments) + GetBrassMod(),
GetSkill(SkillPercussionInstruments) + GetPercMod(),
GetSkill(SkillSinging) + GetSingMod(),
GetSkill(SkillStringedInstruments) + GetStringMod(),
GetSkill(SkillWindInstruments) + GetWindMod());
GetBotOwner()->Message(15, "Bard Skill Mods-- Brass: %i, Percussion: %i, Singing: %i, Stringed: %i, Wind: %i", GetBrassMod(), GetPercMod(), GetSingMod(), GetStringMod(), GetWindMod());
}
}
@@ -15061,7 +15061,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
c->Message(13, "You must target a bot that you own.");
if(targetedBot) {
if(targetedBot->GetSkill(TAUNT) > 0) {
if(targetedBot->GetSkill(SkillTaunt) > 0) {
if(toggle)
taunt = !targetedBot->taunting;
@@ -16336,16 +16336,16 @@ void EntityList::BotPickLock(Bot* rogue)
float bonus1 = 0.0f;
float bonus2 = 0.0f;
float skill = rogue->GetSkill(PICK_LOCK);
float skill = rogue->GetSkill(SkillPickLock);
if(item1) { // Hand slot item
if(item1->GetItem()->SkillModType == PICK_LOCK) {
if(item1->GetItem()->SkillModType == SkillPickLock) {
bonus1 = skill * (((float)item1->GetItem()->SkillModValue) / 100.0f);
}
}
if(item2) { // Primary slot item
if(item2->GetItem()->SkillModType == PICK_LOCK) {
if(item2->GetItem()->SkillModType == SkillPickLock) {
bonus2 = skill * (((float)item2->GetItem()->SkillModValue) / 100.0f);
}
}