Rework of eq_dictionary

This commit is contained in:
Uleat
2016-04-07 17:21:55 -04:00
parent 6ea061dc55
commit e75a53b775
70 changed files with 2786 additions and 2779 deletions
+21 -21
View File
@@ -582,13 +582,13 @@ int32 Client::Tune_GetMeleeMitDmg(Mob* GM, Mob *attacker, int32 damage, int32 mi
int32 Client::GetMeleeDamage(Mob* other, bool GetMinDamage)
{
int Hand = MainPrimary;
int Hand = SlotPrimary;
if (!other)
return 0;
ItemInst* weapon;
weapon = GetInv().GetItem(MainPrimary);
weapon = GetInv().GetItem(SlotPrimary);
if(weapon != nullptr) {
if (!weapon->IsWeapon()) {
@@ -628,7 +628,7 @@ int32 Client::GetMeleeDamage(Mob* other, bool GetMinDamage)
int ucDamageBonus = 0;
if( Hand == MainPrimary && GetLevel() >= 28 && IsWarriorClass() )
if( Hand == SlotPrimary && GetLevel() >= 28 && IsWarriorClass() )
{
ucDamageBonus = GetWeaponDamageBonus( weapon ? weapon->GetItem() : (const Item_Struct*) nullptr );
@@ -662,24 +662,24 @@ void Mob::Tune_FindAccuaryByHitChance(Mob* defender, Mob *attacker, float hit_ch
if (attacker->IsClient())
{//Will check first equiped weapon for skill. Ie. remove wepaons to assess bow.
ItemInst* weapon;
weapon = attacker->CastToClient()->GetInv().GetItem(MainPrimary);
weapon = attacker->CastToClient()->GetInv().GetItem(SlotPrimary);
if(weapon && weapon->IsWeapon()){
attacker->CastToClient()->AttackAnimation(skillinuse, MainPrimary, weapon);
attacker->CastToClient()->AttackAnimation(skillinuse, SlotPrimary, weapon);
}
else {
weapon = attacker->CastToClient()->GetInv().GetItem(MainSecondary);
weapon = attacker->CastToClient()->GetInv().GetItem(SlotSecondary);
if (weapon && weapon->IsWeapon())
attacker->CastToClient()->AttackAnimation(skillinuse, MainSecondary, weapon);
attacker->CastToClient()->AttackAnimation(skillinuse, SlotSecondary, weapon);
else {
weapon = attacker->CastToClient()->GetInv().GetItem(MainRange);
weapon = attacker->CastToClient()->GetInv().GetItem(SlotRange);
if (weapon && weapon->IsWeapon())
attacker->CastToClient()->AttackAnimation(skillinuse, MainRange, weapon);
attacker->CastToClient()->AttackAnimation(skillinuse, SlotRange, weapon);
}
}
}
tmp_hit_chance = Tune_CheckHitChance(defender,attacker, skillinuse, MainPrimary,0,0,0, avoid_override);
tmp_hit_chance = Tune_CheckHitChance(defender,attacker, skillinuse, SlotPrimary,0,0,0, avoid_override);
Message(0, "#Tune - Begin Parse [Interval %i Max Loop Iterations %i]", interval, max_loop);
@@ -691,7 +691,7 @@ void Mob::Tune_FindAccuaryByHitChance(Mob* defender, Mob *attacker, float hit_ch
for (int j=0; j < max_loop; j++)
{
tmp_hit_chance =Tune_CheckHitChance(defender,attacker, skillinuse, MainPrimary,0,false,0, avoid_override, add_acc);
tmp_hit_chance =Tune_CheckHitChance(defender,attacker, skillinuse, SlotPrimary,0,false,0, avoid_override, add_acc);
if (Msg >= 3)
Message(15, "#Tune - Processing... [%i] [ACCURACY %i] Hit Chance %.2f ",j,add_acc,tmp_hit_chance);
@@ -706,7 +706,7 @@ void Mob::Tune_FindAccuaryByHitChance(Mob* defender, Mob *attacker, float hit_ch
if (end){
Tune_CheckHitChance(defender,attacker, skillinuse, MainPrimary,0,Msg,0,avoid_override);//Display Stat Report
Tune_CheckHitChance(defender,attacker, skillinuse, SlotPrimary,0,Msg,0,avoid_override);//Display Stat Report
Message(0, " ");
@@ -742,24 +742,24 @@ void Mob::Tune_FindAvoidanceByHitChance(Mob* defender, Mob *attacker, float hit_
if (attacker->IsClient())
{//Will check first equiped weapon for skill. Ie. remove wepaons to assess bow.
ItemInst* weapon;
weapon = attacker->CastToClient()->GetInv().GetItem(MainPrimary);
weapon = attacker->CastToClient()->GetInv().GetItem(SlotPrimary);
if(weapon && weapon->IsWeapon()){
attacker->CastToClient()->AttackAnimation(skillinuse, MainPrimary, weapon);
attacker->CastToClient()->AttackAnimation(skillinuse, SlotPrimary, weapon);
}
else {
weapon = attacker->CastToClient()->GetInv().GetItem(MainSecondary);
weapon = attacker->CastToClient()->GetInv().GetItem(SlotSecondary);
if (weapon && weapon->IsWeapon())
attacker->CastToClient()->AttackAnimation(skillinuse, MainSecondary, weapon);
attacker->CastToClient()->AttackAnimation(skillinuse, SlotSecondary, weapon);
else {
weapon = attacker->CastToClient()->GetInv().GetItem(MainRange);
weapon = attacker->CastToClient()->GetInv().GetItem(SlotRange);
if (weapon && weapon->IsWeapon())
attacker->CastToClient()->AttackAnimation(skillinuse, MainRange, weapon);
attacker->CastToClient()->AttackAnimation(skillinuse, SlotRange, weapon);
}
}
}
tmp_hit_chance = Tune_CheckHitChance(defender, attacker, skillinuse, MainPrimary,0,0,acc_override, 0);
tmp_hit_chance = Tune_CheckHitChance(defender, attacker, skillinuse, SlotPrimary,0,0,acc_override, 0);
Message(0, "#Tune - Begin Parse [Interval %i Max Loop Iterations %i]", interval, max_loop);
Message(0, "#Tune - Processing... Find Avoidance for hit chance on defender of (%.0f) pct from attacker. [Current Hit Chance %.2f]", hit_chance, tmp_hit_chance);
@@ -769,7 +769,7 @@ void Mob::Tune_FindAvoidanceByHitChance(Mob* defender, Mob *attacker, float hit_
for (int j=0; j < max_loop; j++)
{
tmp_hit_chance = Tune_CheckHitChance(defender, attacker, skillinuse, MainPrimary, 0,0, acc_override, 0,0,add_avoid);
tmp_hit_chance = Tune_CheckHitChance(defender, attacker, skillinuse, SlotPrimary, 0,0, acc_override, 0,0,add_avoid);
if (Msg >= 3)
Message(0, "#Tune - Processing... [%i] [AVOIDANCE %i] Hit Chance %.2f ",j,add_avoid,tmp_hit_chance);
@@ -784,7 +784,7 @@ void Mob::Tune_FindAvoidanceByHitChance(Mob* defender, Mob *attacker, float hit_
if (end){
Tune_CheckHitChance(defender,attacker, skillinuse, MainPrimary,0,Msg,acc_override, 0);//Display Stat Report
Tune_CheckHitChance(defender,attacker, skillinuse, SlotPrimary,0,Msg,acc_override, 0);//Display Stat Report
Message(0, " ");