mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
Implemented support for using target rings from item clicks.
(Thanks again to Lecht for the help)
This commit is contained in:
@@ -4004,6 +4004,10 @@ void Client::Handle_OP_CastSpell(const EQApplicationPacket *app)
|
||||
|
||||
CastSpell_Struct* castspell = (CastSpell_Struct*)app->pBuffer;
|
||||
|
||||
targetring_x = castspell->x_pos;
|
||||
targetring_y = castspell->y_pos;
|
||||
targetring_z = castspell->z_pos;
|
||||
|
||||
#ifdef _EQDEBUG
|
||||
LogFile->write(EQEMuLog::Debug, "cs_unknown2: %u %i", (uint8)castspell->cs_unknown[0], castspell->cs_unknown[0]);
|
||||
LogFile->write(EQEMuLog::Debug, "cs_unknown2: %u %i", (uint8)castspell->cs_unknown[1], castspell->cs_unknown[1]);
|
||||
@@ -4034,14 +4038,10 @@ void Client::Handle_OP_CastSpell(const EQApplicationPacket *app)
|
||||
return;
|
||||
}
|
||||
|
||||
targetring_x = castspell->x_pos;
|
||||
targetring_y = castspell->y_pos;
|
||||
targetring_z = castspell->z_pos;
|
||||
|
||||
CastSpell(spell_to_cast, castspell->target_id, castspell->slot);
|
||||
}
|
||||
/* Spell Slot or Potion Belt Slot */
|
||||
else if ((castspell->slot == USE_ITEM_SPELL_SLOT) || (castspell->slot == POTION_BELT_SPELL_SLOT)) // ITEM or POTION cast
|
||||
else if ((castspell->slot == USE_ITEM_SPELL_SLOT) || (castspell->slot == POTION_BELT_SPELL_SLOT)|| (castspell->slot == TARGET_RING_SPELL_SLOT)) // ITEM or POTION cast
|
||||
{
|
||||
//discipline, using the item spell slot
|
||||
if (castspell->inventoryslot == INVALID_INDEX) {
|
||||
@@ -4051,7 +4051,7 @@ void Client::Handle_OP_CastSpell(const EQApplicationPacket *app)
|
||||
}
|
||||
return;
|
||||
}
|
||||
else if (m_inv.SupportsClickCasting(castspell->inventoryslot) || (castspell->slot == POTION_BELT_SPELL_SLOT)) // sanity check
|
||||
else if (m_inv.SupportsClickCasting(castspell->inventoryslot) || (castspell->slot == POTION_BELT_SPELL_SLOT) || (castspell->slot == TARGET_RING_SPELL_SLOT)) // sanity check
|
||||
{
|
||||
// packet field types will be reviewed as packet transistions occur -U
|
||||
const ItemInst* inst = m_inv[castspell->inventoryslot]; //slot values are int16, need to check packet on this field
|
||||
@@ -8646,6 +8646,7 @@ void Client::Handle_OP_ItemVerifyRequest(const EQApplicationPacket *app)
|
||||
IsFeared() ||
|
||||
IsMezzed() ||
|
||||
DivineAura() ||
|
||||
(spells[spell_id].targettype == ST_Ring) ||
|
||||
(IsSilenced() && !IsDiscipline(spell_id)) ||
|
||||
(IsAmnesiad() && IsDiscipline(spell_id)) ||
|
||||
(IsDetrimentalSpell(spell_id) && !zone->CanDoCombat())
|
||||
|
||||
Reference in New Issue
Block a user