mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
Fix nullptr and item_slot check
This commit is contained in:
+2
-2
@@ -485,9 +485,9 @@ bool Mob::DoCastSpell(uint16 spell_id, uint16 target_id, uint16 slot,
|
||||
}
|
||||
|
||||
// This needs a bit more work for saving timer to PP for zoning etc
|
||||
if (IsClient() && item_slot) {
|
||||
if (IsClient() && item_slot != INVALID_INDEX) {
|
||||
ItemInst *itm = CastToClient()->GetInv().GetItem(item_slot);
|
||||
if (itm->GetItem()->RecastDelay) {
|
||||
if (itm && itm->GetItem()->RecastDelay) {
|
||||
outapp = new EQApplicationPacket(OP_ItemRecastDelay, sizeof(ItemRecastDelay_Struct));
|
||||
ItemRecastDelay_Struct *ird = (ItemRecastDelay_Struct *)outapp->pBuffer;
|
||||
ird->recast_delay = itm->GetItem()->RecastDelay;
|
||||
|
||||
Reference in New Issue
Block a user