Example #1
0
    public void Interact(RoomUtility.DATA type, Node node, ushort playerId)
    {
        switch (type)
        {
        case RoomUtility.DATA.CHEST:
            RoomUtility.OpenChest(node.GetMeta("id") as string + mapId, (ushort)(int)node.Get("item"), GetPlayerById(playerId));
            break;

        case RoomUtility.DATA.SOUL_KEEPER:
            RoomUtility.BreakSoulKeeper(node.GetMeta("id") as string + mapId, (ushort)(int)node.Get("soul"), GetPlayerById(playerId));
            break;
        }
    }
Example #2
0
    public Packet GetSpecialNodeData(Packet packet, Node node, Character player)
    {
        RoomUtility.DATA dataType = (RoomUtility.DATA)(int)(node.Call("get_data"));

        switch (dataType)
        {
        case RoomUtility.DATA.CHEST:
        case RoomUtility.DATA.SOUL_KEEPER:
            return(packet.AddU8(RoomUtility.IsChestOpened(player, node.GetMeta("id") as string + mapId) ? (byte)1 : (byte)0));
        }

        return(null);
    }