Ejemplo n.º 1
0
        /// <summary>
        /// Process a player's push.
        /// </summary>
        /// <param name="player">The player doing the action.</param>
        /// <param name="world">A reference to the gameworld.</param>
        private void ProcessPush(Player player, GameWorld world)
        {
            Position posFrom  = netmsg.GetPosition();
            ushort   thingID  = netmsg.GetU16();
            byte     stackpos = netmsg.GetByte();
            Position posTo    = netmsg.GetPosition();
            byte     count    = netmsg.GetByte();

#if DEBUG
            Log.WriteDebug("In ProcessPush()");
            Log.WriteDebug("posFrom: " + posFrom);
            Log.WriteDebug("thingID: " + thingID);
            Log.WriteDebug("stackpos: " + stackpos);
            Log.WriteDebug("posTo: " + posTo);
            Log.WriteDebug("count: " + count);
#endif
            if (count == 0)
            {
                return;
            }
            world.HandlePush(player, posFrom, thingID, stackpos, posTo, count);
        }
Ejemplo n.º 2
0
 public void DoAction(GameWorld world)
 {
     world.HandlePush(player, posFrom, thingID, stackpos, posTo, count);
     player.CurrentDelayedAction = null;
 }
Ejemplo n.º 3
0
 public void DoAction(GameWorld world)
 {
     world.HandlePush(player, posFrom, thingID, stackpos, posTo, count);
     player.CurrentDelayedAction = null;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Process a player's push.
 /// </summary>
 /// <param name="player">The player doing the action.</param>
 /// <param name="world">A reference to the gameworld.</param>
 private void ProcessPush(Player player, GameWorld world)
 {
     Position posFrom = netmsg.GetPosition();
     ushort thingID = netmsg.GetU16();
     byte stackpos = netmsg.GetByte();
     Position posTo = netmsg.GetPosition();
     byte count = netmsg.GetByte();
     #if DEBUG
     Log.WriteDebug("In ProcessPush()");
     Log.WriteDebug("posFrom: " + posFrom);
     Log.WriteDebug("thingID: " + thingID);
     Log.WriteDebug("stackpos: " + stackpos);
     Log.WriteDebug("posTo: " + posTo);
     Log.WriteDebug("count: " + count);
     #endif
     if (count == 0) {
         return;
     }
     world.HandlePush(player, posFrom, thingID, stackpos, posTo, count);
 }