mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 13:28:25 +00:00
Added class EQEmu::InventorySlot
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::legacy::SlotPrimary;
|
||||
int Hand = EQEmu::inventory::slotPrimary;
|
||||
|
||||
if (!other)
|
||||
return 0;
|
||||
|
||||
EQEmu::ItemInstance* weapon;
|
||||
weapon = GetInv().GetItem(EQEmu::legacy::SlotPrimary);
|
||||
weapon = GetInv().GetItem(EQEmu::inventory::slotPrimary);
|
||||
|
||||
if(weapon != nullptr) {
|
||||
if (!weapon->IsWeapon()) {
|
||||
@@ -628,7 +628,7 @@ int32 Client::GetMeleeDamage(Mob* other, bool GetMinDamage)
|
||||
|
||||
int ucDamageBonus = 0;
|
||||
|
||||
if (Hand == EQEmu::legacy::SlotPrimary && GetLevel() >= 28 && IsWarriorClass())
|
||||
if (Hand == EQEmu::inventory::slotPrimary && GetLevel() >= 28 && IsWarriorClass())
|
||||
{
|
||||
ucDamageBonus = GetWeaponDamageBonus(weapon ? weapon->GetItem() : (const EQEmu::ItemData*) 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.
|
||||
EQEmu::ItemInstance* weapon;
|
||||
weapon = attacker->CastToClient()->GetInv().GetItem(EQEmu::legacy::SlotPrimary);
|
||||
weapon = attacker->CastToClient()->GetInv().GetItem(EQEmu::inventory::slotPrimary);
|
||||
|
||||
if(weapon && weapon->IsWeapon()){
|
||||
attacker->CastToClient()->AttackAnimation(skillinuse, EQEmu::legacy::SlotPrimary, weapon);
|
||||
attacker->CastToClient()->AttackAnimation(skillinuse, EQEmu::inventory::slotPrimary, weapon);
|
||||
}
|
||||
else {
|
||||
weapon = attacker->CastToClient()->GetInv().GetItem(EQEmu::legacy::SlotSecondary);
|
||||
weapon = attacker->CastToClient()->GetInv().GetItem(EQEmu::inventory::slotSecondary);
|
||||
if (weapon && weapon->IsWeapon())
|
||||
attacker->CastToClient()->AttackAnimation(skillinuse, EQEmu::legacy::SlotSecondary, weapon);
|
||||
attacker->CastToClient()->AttackAnimation(skillinuse, EQEmu::inventory::slotSecondary, weapon);
|
||||
else {
|
||||
weapon = attacker->CastToClient()->GetInv().GetItem(EQEmu::legacy::SlotRange);
|
||||
weapon = attacker->CastToClient()->GetInv().GetItem(EQEmu::inventory::slotRange);
|
||||
if (weapon && weapon->IsWeapon())
|
||||
attacker->CastToClient()->AttackAnimation(skillinuse, EQEmu::legacy::SlotRange, weapon);
|
||||
attacker->CastToClient()->AttackAnimation(skillinuse, EQEmu::inventory::slotRange, weapon);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tmp_hit_chance = Tune_CheckHitChance(defender, attacker, skillinuse, EQEmu::legacy::SlotPrimary, 0, 0, 0, avoid_override);
|
||||
tmp_hit_chance = Tune_CheckHitChance(defender, attacker, skillinuse, EQEmu::inventory::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, EQEmu::legacy::SlotPrimary, 0, false, 0, avoid_override, add_acc);
|
||||
tmp_hit_chance = Tune_CheckHitChance(defender, attacker, skillinuse, EQEmu::inventory::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, EQEmu::legacy::SlotPrimary, 0, Msg, 0, avoid_override);//Display Stat Report
|
||||
Tune_CheckHitChance(defender, attacker, skillinuse, EQEmu::inventory::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.
|
||||
EQEmu::ItemInstance* weapon;
|
||||
weapon = attacker->CastToClient()->GetInv().GetItem(EQEmu::legacy::SlotPrimary);
|
||||
weapon = attacker->CastToClient()->GetInv().GetItem(EQEmu::inventory::slotPrimary);
|
||||
|
||||
if(weapon && weapon->IsWeapon()){
|
||||
attacker->CastToClient()->AttackAnimation(skillinuse, EQEmu::legacy::SlotPrimary, weapon);
|
||||
attacker->CastToClient()->AttackAnimation(skillinuse, EQEmu::inventory::slotPrimary, weapon);
|
||||
}
|
||||
else {
|
||||
weapon = attacker->CastToClient()->GetInv().GetItem(EQEmu::legacy::SlotSecondary);
|
||||
weapon = attacker->CastToClient()->GetInv().GetItem(EQEmu::inventory::slotSecondary);
|
||||
if (weapon && weapon->IsWeapon())
|
||||
attacker->CastToClient()->AttackAnimation(skillinuse, EQEmu::legacy::SlotSecondary, weapon);
|
||||
attacker->CastToClient()->AttackAnimation(skillinuse, EQEmu::inventory::slotSecondary, weapon);
|
||||
else {
|
||||
weapon = attacker->CastToClient()->GetInv().GetItem(EQEmu::legacy::SlotRange);
|
||||
weapon = attacker->CastToClient()->GetInv().GetItem(EQEmu::inventory::slotRange);
|
||||
if (weapon && weapon->IsWeapon())
|
||||
attacker->CastToClient()->AttackAnimation(skillinuse, EQEmu::legacy::SlotRange, weapon);
|
||||
attacker->CastToClient()->AttackAnimation(skillinuse, EQEmu::inventory::slotRange, weapon);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tmp_hit_chance = Tune_CheckHitChance(defender, attacker, skillinuse, EQEmu::legacy::SlotPrimary, 0, 0, acc_override, 0);
|
||||
tmp_hit_chance = Tune_CheckHitChance(defender, attacker, skillinuse, EQEmu::inventory::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, EQEmu::legacy::SlotPrimary, 0, 0, acc_override, 0, 0, add_avoid);
|
||||
tmp_hit_chance = Tune_CheckHitChance(defender, attacker, skillinuse, EQEmu::inventory::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, EQEmu::legacy::SlotPrimary, 0, Msg, acc_override, 0);//Display Stat Report
|
||||
Tune_CheckHitChance(defender, attacker, skillinuse, EQEmu::inventory::slotPrimary, 0, Msg, acc_override, 0);//Display Stat Report
|
||||
|
||||
Message(0, " ");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user