mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-22 12:18:27 +00:00
Reintegration of inventory-based EQDictionary references
This commit is contained in:
+21
-21
@@ -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 = EQEmu::inventory::slotPrimary;
|
||||
int Hand = EQEmu::invslot::slotPrimary;
|
||||
|
||||
if (!other)
|
||||
return 0;
|
||||
|
||||
EQEmu::ItemInstance* weapon;
|
||||
weapon = GetInv().GetItem(EQEmu::inventory::slotPrimary);
|
||||
weapon = GetInv().GetItem(EQEmu::invslot::slotPrimary);
|
||||
|
||||
if(weapon != nullptr) {
|
||||
if (!weapon->IsWeapon()) {
|
||||
@@ -627,7 +627,7 @@ int32 Client::GetMeleeDamage(Mob* other, bool GetMinDamage)
|
||||
|
||||
int ucDamageBonus = 0;
|
||||
|
||||
if (Hand == EQEmu::inventory::slotPrimary && GetLevel() >= 28 && IsWarriorClass())
|
||||
if (Hand == EQEmu::invslot::slotPrimary && GetLevel() >= 28 && IsWarriorClass())
|
||||
{
|
||||
ucDamageBonus = GetWeaponDamageBonus(weapon ? weapon->GetItem() : (const EQEmu::ItemData*) nullptr);
|
||||
|
||||
@@ -661,24 +661,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.
|
||||
EQEmu::ItemInstance* weapon;
|
||||
weapon = attacker->CastToClient()->GetInv().GetItem(EQEmu::inventory::slotPrimary);
|
||||
weapon = attacker->CastToClient()->GetInv().GetItem(EQEmu::invslot::slotPrimary);
|
||||
|
||||
if(weapon && weapon->IsWeapon()){
|
||||
skillinuse = attacker->CastToClient()->AttackAnimation(EQEmu::inventory::slotPrimary, weapon);
|
||||
skillinuse = attacker->CastToClient()->AttackAnimation(EQEmu::invslot::slotPrimary, weapon);
|
||||
}
|
||||
else {
|
||||
weapon = attacker->CastToClient()->GetInv().GetItem(EQEmu::inventory::slotSecondary);
|
||||
weapon = attacker->CastToClient()->GetInv().GetItem(EQEmu::invslot::slotSecondary);
|
||||
if (weapon && weapon->IsWeapon())
|
||||
skillinuse = attacker->CastToClient()->AttackAnimation(EQEmu::inventory::slotSecondary, weapon);
|
||||
skillinuse = attacker->CastToClient()->AttackAnimation(EQEmu::invslot::slotSecondary, weapon);
|
||||
else {
|
||||
weapon = attacker->CastToClient()->GetInv().GetItem(EQEmu::inventory::slotRange);
|
||||
weapon = attacker->CastToClient()->GetInv().GetItem(EQEmu::invslot::slotRange);
|
||||
if (weapon && weapon->IsWeapon())
|
||||
skillinuse = attacker->CastToClient()->AttackAnimation(EQEmu::inventory::slotRange, weapon);
|
||||
skillinuse = attacker->CastToClient()->AttackAnimation(EQEmu::invslot::slotRange, weapon);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tmp_hit_chance = Tune_CheckHitChance(defender, attacker, skillinuse, EQEmu::inventory::slotPrimary, 0, 0, 0, avoid_override);
|
||||
tmp_hit_chance = Tune_CheckHitChance(defender, attacker, skillinuse, EQEmu::invslot::slotPrimary, 0, 0, 0, avoid_override);
|
||||
|
||||
|
||||
Message(0, "#Tune - Begin Parse [Interval %i Max Loop Iterations %i]", interval, max_loop);
|
||||
@@ -690,7 +690,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, EQEmu::inventory::slotPrimary, 0, false, 0, avoid_override, add_acc);
|
||||
tmp_hit_chance = Tune_CheckHitChance(defender, attacker, skillinuse, EQEmu::invslot::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);
|
||||
@@ -705,7 +705,7 @@ void Mob::Tune_FindAccuaryByHitChance(Mob* defender, Mob *attacker, float hit_ch
|
||||
|
||||
if (end){
|
||||
|
||||
Tune_CheckHitChance(defender, attacker, skillinuse, EQEmu::inventory::slotPrimary, 0, Msg, 0, avoid_override);//Display Stat Report
|
||||
Tune_CheckHitChance(defender, attacker, skillinuse, EQEmu::invslot::slotPrimary, 0, Msg, 0, avoid_override);//Display Stat Report
|
||||
|
||||
Message(0, " ");
|
||||
|
||||
@@ -741,24 +741,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.
|
||||
EQEmu::ItemInstance* weapon;
|
||||
weapon = attacker->CastToClient()->GetInv().GetItem(EQEmu::inventory::slotPrimary);
|
||||
weapon = attacker->CastToClient()->GetInv().GetItem(EQEmu::invslot::slotPrimary);
|
||||
|
||||
if(weapon && weapon->IsWeapon()){
|
||||
skillinuse = attacker->CastToClient()->AttackAnimation(EQEmu::inventory::slotPrimary, weapon);
|
||||
skillinuse = attacker->CastToClient()->AttackAnimation(EQEmu::invslot::slotPrimary, weapon);
|
||||
}
|
||||
else {
|
||||
weapon = attacker->CastToClient()->GetInv().GetItem(EQEmu::inventory::slotSecondary);
|
||||
weapon = attacker->CastToClient()->GetInv().GetItem(EQEmu::invslot::slotSecondary);
|
||||
if (weapon && weapon->IsWeapon())
|
||||
skillinuse = attacker->CastToClient()->AttackAnimation(EQEmu::inventory::slotSecondary, weapon);
|
||||
skillinuse = attacker->CastToClient()->AttackAnimation(EQEmu::invslot::slotSecondary, weapon);
|
||||
else {
|
||||
weapon = attacker->CastToClient()->GetInv().GetItem(EQEmu::inventory::slotRange);
|
||||
weapon = attacker->CastToClient()->GetInv().GetItem(EQEmu::invslot::slotRange);
|
||||
if (weapon && weapon->IsWeapon())
|
||||
skillinuse = attacker->CastToClient()->AttackAnimation(EQEmu::inventory::slotRange, weapon);
|
||||
skillinuse = attacker->CastToClient()->AttackAnimation(EQEmu::invslot::slotRange, weapon);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tmp_hit_chance = Tune_CheckHitChance(defender, attacker, skillinuse, EQEmu::inventory::slotPrimary, 0, 0, acc_override, 0);
|
||||
tmp_hit_chance = Tune_CheckHitChance(defender, attacker, skillinuse, EQEmu::invslot::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);
|
||||
@@ -768,7 +768,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, EQEmu::inventory::slotPrimary, 0, 0, acc_override, 0, 0, add_avoid);
|
||||
tmp_hit_chance = Tune_CheckHitChance(defender, attacker, skillinuse, EQEmu::invslot::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);
|
||||
@@ -783,7 +783,7 @@ void Mob::Tune_FindAvoidanceByHitChance(Mob* defender, Mob *attacker, float hit_
|
||||
|
||||
if (end){
|
||||
|
||||
Tune_CheckHitChance(defender, attacker, skillinuse, EQEmu::inventory::slotPrimary, 0, Msg, acc_override, 0);//Display Stat Report
|
||||
Tune_CheckHitChance(defender, attacker, skillinuse, EQEmu::invslot::slotPrimary, 0, Msg, acc_override, 0);//Display Stat Report
|
||||
|
||||
Message(0, " ");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user