void SwapInv(OP code, PlayerConnection c) { byte srcSlot, destSlot; c.Seek(2).Get(out srcSlot).Get(out destSlot); c.Log("{0} {1} -> {2}", code, srcSlot, destSlot); c.player.SwapItem(SlotID.CHARACTER, (SlotID)srcSlot, SlotID.CHARACTER, (SlotID)destSlot); }
void AutoStoreBag(OP code, PlayerConnection c) { byte srcBag, srcSlot, destBag; c.Seek(2).Get(out srcBag).Get(out srcSlot).Get(out destBag); c.Log("{0} {1}.{2} -> {3}", code, srcBag, srcSlot, destBag); c.player.SwapItem((SlotID)srcBag, (SlotID)srcSlot, (SlotID)destBag, SlotID.CHARACTER); }
void AutoEquip(OP code, PlayerConnection c) { byte srcBag, srcSlot; c.Seek(2).Get(out srcBag).Get(out srcSlot); c.Log("{0} {1}.{2}", code, srcBag, srcSlot); c.player.AutoEquipItem((SlotID)srcBag, (SlotID)srcSlot); }
void Swap(OP code, PlayerConnection c) { byte srcBag, srcSlot, destBag, destSlot; c.Seek(2).Get(out destBag).Get(out destSlot).Get(out srcBag).Get(out srcSlot); c.Log("{0} {1}.{2} -> {3}.{4}", code, srcBag, srcSlot, destBag, destSlot); c.player.SwapItem((SlotID)srcBag, (SlotID)srcSlot, (SlotID)destBag, (SlotID)destSlot); }
void SheatheTypeChange(OP code, PlayerConnection c) { uint anim; c.Seek(2).Get(out anim); c.Log("{0} {1}", code, (SheatheType)anim); uint n = c.player.GetUpdateValue(UpdateFields.UNIT_FIELD_BYTES_1); n = (uint)((n & 0xffff00ff) | (anim << 8)); c.player.SetUpdateValue(UpdateFields.UNIT_FIELD_BYTES_1, n); }
void StandStateChange(OP code, PlayerConnection c) { uint anim; c.Seek(2).Get(out anim); c.Log("{0} {1}", code, (UnitStandState)anim); if ((UnitStandState)anim != UnitStandState.SITTING) { c.player.LogoutCancel(); } c.player.SetUpdateValue(UpdateFields.UNIT_NPC_EMOTESTATE, (uint)anim); }
void Destroy(OP code, PlayerConnection c) { c.Log("{0} {1}", code, c.InputLength); }