This commit is contained in:
KayenEQ
2014-07-18 17:00:39 -04:00
64 changed files with 1401 additions and 912 deletions
+9 -9
View File
@@ -1952,14 +1952,14 @@ void Mob::SetAttackTimer() {
Timer* TimerToUse = nullptr;
const Item_Struct* PrimaryWeapon = nullptr;
for (int i=SLOT_RANGE; i<=SLOT_SECONDARY; i++) {
for (int i=MainRange; i<=MainSecondary; i++) {
//pick a timer
if (i == SLOT_PRIMARY)
if (i == MainPrimary)
TimerToUse = &attack_timer;
else if (i == SLOT_RANGE)
else if (i == MainRange)
TimerToUse = &ranged_timer;
else if(i == SLOT_SECONDARY)
else if(i == MainSecondary)
TimerToUse = &attack_dw_timer;
else //invalid slot (hands will always hit this)
continue;
@@ -1980,7 +1980,7 @@ void Mob::SetAttackTimer() {
}
//special offhand stuff
if(i == SLOT_SECONDARY) {
if(i == MainSecondary) {
//if we have a 2H weapon in our main hand, no dual
if(PrimaryWeapon != nullptr) {
if( PrimaryWeapon->ItemClass == ItemClassCommon
@@ -2059,7 +2059,7 @@ void Mob::SetAttackTimer() {
if(IsClient())
{
float max_quiver = 0;
for(int r = SLOT_PERSONAL_BEGIN; r <= SLOT_PERSONAL_END; r++)
for(int r = EmuConstants::GENERAL_BEGIN; r <= EmuConstants::GENERAL_END; r++)
{
const ItemInst *pi = CastToClient()->GetInv().GetItem(r);
if(!pi)
@@ -2083,7 +2083,7 @@ void Mob::SetAttackTimer() {
TimerToUse->SetAtTrigger(speed, true);
}
if(i == SLOT_PRIMARY)
if(i == MainPrimary)
PrimaryWeapon = ItemToUse;
}
@@ -2094,8 +2094,8 @@ bool Mob::CanThisClassDualWield(void) const {
return(GetSkill(SkillDualWield) > 0);
}
else if(CastToClient()->HasSkill(SkillDualWield)) {
const ItemInst* pinst = CastToClient()->GetInv().GetItem(SLOT_PRIMARY);
const ItemInst* sinst = CastToClient()->GetInv().GetItem(SLOT_SECONDARY);
const ItemInst* pinst = CastToClient()->GetInv().GetItem(MainPrimary);
const ItemInst* sinst = CastToClient()->GetInv().GetItem(MainSecondary);
// 2HS, 2HB, or 2HP
if(pinst && pinst->IsWeapon()) {