Beispiel #1
0
        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);
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        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);
        }
Beispiel #4
0
        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);
        }
Beispiel #5
0
        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);
        }
Beispiel #6
0
        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);
        }
Beispiel #7
0
 void Destroy(OP code, PlayerConnection c)
 {
     c.Log("{0} {1}", code, c.InputLength);
 }