incorect
02-13-2010, 10:33 PM
I think I might have a fix for the pet dual wielding issue for magi and necro.
in the file mob.cpp there is a function Mob::CanThisClassDualWield(void) const.
This function doesn't appear to have any provisions for pets. This might not be the most ideal way to correct the issue, but I added some code at the top of this function to return true for pets of the appropriate level.
Here is the code for this function with my addition
bool Mob::CanThisClassDualWield(void) const //Dual wield not Duel, busy someone else fix it (fixed! bUsh)
{
// All npcs over level 13 can dual wield
if (this->IsNPC() && (this->GetLevel() >= 13))
return true;
if (IsPet() && GetOwner()->IsClient())
{
if (GetOwner()->GetClass() == MAGICIAN && GetLevel() >= MAGI_PET_DUAL_LEVEL
|| GetOwner()->GetClass() == NECROMANCER && GetLevel() >= NECRO_PET_DUAL_LEVEL)
{
return true;
}
}
...
The MAGI_PET_DUAL_LEVEL and NECRO_PET_DUAL_LEVEL are constants that reflect at what pet level the pets should dual wield. Those should be defined somewhere appropriate or simply replaced with a number. I figured for Magi any pet lvl 22 or over should dual wield as the lvl 24 summon spells should have dual wielding pets. The lvl 20 summon spells can't create a lvl 22 pet, i think.. so that should limit it to lvl 24 spell summons and above. For necros the level should probably be 24 or 25 as the lvl 29 summon spells should be dual wielding.
DISCLAIMER: I have not tested this code yet as I have not figured out how to get this compiled and setup my own emu server.
- Incorect
in the file mob.cpp there is a function Mob::CanThisClassDualWield(void) const.
This function doesn't appear to have any provisions for pets. This might not be the most ideal way to correct the issue, but I added some code at the top of this function to return true for pets of the appropriate level.
Here is the code for this function with my addition
bool Mob::CanThisClassDualWield(void) const //Dual wield not Duel, busy someone else fix it (fixed! bUsh)
{
// All npcs over level 13 can dual wield
if (this->IsNPC() && (this->GetLevel() >= 13))
return true;
if (IsPet() && GetOwner()->IsClient())
{
if (GetOwner()->GetClass() == MAGICIAN && GetLevel() >= MAGI_PET_DUAL_LEVEL
|| GetOwner()->GetClass() == NECROMANCER && GetLevel() >= NECRO_PET_DUAL_LEVEL)
{
return true;
}
}
...
The MAGI_PET_DUAL_LEVEL and NECRO_PET_DUAL_LEVEL are constants that reflect at what pet level the pets should dual wield. Those should be defined somewhere appropriate or simply replaced with a number. I figured for Magi any pet lvl 22 or over should dual wield as the lvl 24 summon spells should have dual wielding pets. The lvl 20 summon spells can't create a lvl 22 pet, i think.. so that should limit it to lvl 24 spell summons and above. For necros the level should probably be 24 or 25 as the lvl 29 summon spells should be dual wielding.
DISCLAIMER: I have not tested this code yet as I have not figured out how to get this compiled and setup my own emu server.
- Incorect