mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
Implement extra spell gems!
New limits:
Tit: 9
SoF: 9
SoD: 10
UF: 12
RoF: 12
RoF2: 12
The SoF client doesn't actually support 10 like SoF should
RoF/RoF2 actually have 4 extra broken spell gems in the UI. They don't work and
will likely crash your client
Quest stuff assumes you are passing in valid slots.
(note the old default of 10 should be 22)
There are still somethings to do like clean up the memmed spells if one switches
to an older client that doesn't support as many as their previous client.
This commit is contained in:
+4
-4
@@ -341,7 +341,7 @@ bool NPC::AIDoSpellCast(uint8 i, Mob* tar, int32 mana_cost, uint32* oDontDoAgain
|
||||
SetCurrentSpeed(0);
|
||||
}
|
||||
|
||||
return CastSpell(AIspells[i].spellid, tar->GetID(), 1, AIspells[i].manacost == -2 ? 0 : -1, mana_cost, oDontDoAgainBefore, -1, -1, 0, &(AIspells[i].resist_adjust));
|
||||
return CastSpell(AIspells[i].spellid, tar->GetID(), EQEmu::CastingSlot::Gem2, AIspells[i].manacost == -2 ? 0 : -1, mana_cost, oDontDoAgainBefore, -1, -1, 0, &(AIspells[i].resist_adjust));
|
||||
}
|
||||
|
||||
bool EntityList::AICheckCloseBeneficialSpells(NPC* caster, uint8 iChance, float iRange, uint16 iSpellTypes) {
|
||||
@@ -673,11 +673,11 @@ void Client::AI_SpellCast()
|
||||
}
|
||||
|
||||
uint32 spell_to_cast = 0xFFFFFFFF;
|
||||
uint32 slot_to_use = 10;
|
||||
EQEmu::CastingSlot slot_to_use = EQEmu::CastingSlot::Item;
|
||||
if(valid_spells.size() == 1)
|
||||
{
|
||||
spell_to_cast = valid_spells[0];
|
||||
slot_to_use = slots[0];
|
||||
slot_to_use = static_cast<EQEmu::CastingSlot>(slots[0]);
|
||||
}
|
||||
else if(valid_spells.empty())
|
||||
{
|
||||
@@ -687,7 +687,7 @@ void Client::AI_SpellCast()
|
||||
{
|
||||
uint32 idx = zone->random.Int(0, (valid_spells.size()-1));
|
||||
spell_to_cast = valid_spells[idx];
|
||||
slot_to_use = slots[idx];
|
||||
slot_to_use = static_cast<EQEmu::CastingSlot>(slots[idx]);
|
||||
}
|
||||
|
||||
if(IsMezSpell(spell_to_cast) || IsFearSpell(spell_to_cast))
|
||||
|
||||
Reference in New Issue
Block a user