Skip to content

Commit

Permalink
Initial work on OP_ItemRecastDelay
Browse files Browse the repository at this point in the history
  • Loading branch information
mackal committed Oct 1, 2014
1 parent be52d41 commit 7800cbb
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions common/emu_oplist.h
Expand Up @@ -542,4 +542,5 @@ N(OP_ZoneServerInfo),
N(OP_ZoneServerReady),
N(OP_ZoneSpawns),
N(OP_ZoneUnavail),
N(OP_ItemRecastDelay),
// mail and chat opcodes located in ../mail_oplist.h
7 changes: 7 additions & 0 deletions common/eq_packet_structs.h
Expand Up @@ -4264,6 +4264,13 @@ struct ItemVerifyReply_Struct {
/*012*/
};

struct ItemRecastDelay_Struct {
/*000*/ uint32 recast_delay; // in seconds
/*004*/ uint32 recast_type;
/*008*/ uint32 unknown008;
/*012*/
};

/**
* Shroud yourself. For yourself shrouding, this has your spawnId, spawnStruct,
* bits of your charProfileStruct (no checksum, then charProfile up till
Expand Down
1 change: 1 addition & 0 deletions common/opcode_dispatch.h
Expand Up @@ -306,6 +306,7 @@ OUTz(OP_FinishWindow2);
//OUTv(OP_AdventureMerchantResponse, strlen(msg)+2);
OUTv(OP_ItemPacket, ItemPacket_Struct);
OUTv(OP_ColoredText, ColoredText_Struct);
OUTv(OP_ItemRecastDelay, ItemRecastDelay_Struct);
OUTv(OP_FormattedMessage, FormattedMessage_Struct);
OUTv(OP_GuildMemberList, uint32); //variable length, but nasty
OUTv(OP_InterruptCast, InterruptCast_Struct);
Expand Down
2 changes: 2 additions & 0 deletions utils/patches/patch_RoF.conf
Expand Up @@ -653,3 +653,5 @@ OP_RAWOutOfSession=0x0000
# we need to document the differences between these packets to make identifying them easier
OP_Some3ByteHPUpdate=0x0000 # initial HP update for mobs
OP_InitialHPUpdate=0x0000

OP_ItemRecastDelay=0x57ed
2 changes: 2 additions & 0 deletions utils/patches/patch_SoD.conf
Expand Up @@ -660,3 +660,5 @@ OP_RAWOutOfSession=0x0000 #
# we need to document the differences between these packets to make identifying them easier
OP_Some3ByteHPUpdate=0x0000 # initial HP update for mobs
OP_InitialHPUpdate=0x0000 #

OP_ItemRecastDelay=0x15c4
2 changes: 2 additions & 0 deletions utils/patches/patch_Underfoot.conf
Expand Up @@ -654,3 +654,5 @@ OP_RAWOutOfSession=0x0000 #
# we need to document the differences between these packets to make identifying them easier
OP_Some3ByteHPUpdate=0x0000 # initial HP update for mobs
OP_InitialHPUpdate=0x0000 #

OP_ItemRecastDelay=0x82d7
13 changes: 13 additions & 0 deletions zone/spells.cpp
Expand Up @@ -484,6 +484,19 @@ bool Mob::DoCastSpell(uint16 spell_id, uint16 target_id, uint16 slot,
return false;
}

// This needs a bit more work for saving timer to PP for zoning etc
if (IsClient() && item_slot) {
ItemInst *itm = CastToClient()->GetInv().GetItem(item_slot);
if (itm->GetItem()->RecastDelay) {
outapp = new EQApplicationPacket(OP_ItemRecastDelay, sizeof(ItemRecastDelay_Struct));
ItemRecastDelay_Struct *ird = (ItemRecastDelay_Struct *)outapp->pBuffer;
ird->recast_delay = itm->GetItem()->RecastDelay;
ird->recast_type = itm->GetItem()->RecastType;
CastToClient()->QueuePacket(outapp);
safe_delete(outapp);
}
}

return(true);
}

Expand Down

1 comment on commit 7800cbb

@mackal
Copy link
Member Author

@mackal mackal commented on 7800cbb Oct 1, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If anyone can to try 0x0ada for SoF, please do. (The item needs to have a cast time, the client seems to handle instant cast itself)

Please sign in to comment.