Beispiel #1
0
 public NpcEventArgs(NpcCore npcStructure, PlayerLocation knownPosition, string text, Level level, Player player)
 {
     NpcStructure  = npcStructure;
     Player        = player;
     KnownPosition = knownPosition;
     Level         = level;
     Text          = text;
 }
Beispiel #2
0
        public Package UseItemHundler(McpeUseItem packet, Player player)
        {
            NpcCore entity = Npcs.Values.FirstOrDefault(inc => inc.Block.Coordinates == packet.blockcoordinates);

            if (entity != null && entity.Block != new Air())
            {
                //entity.Player = player;
                OnEntityEvent(new NpcEventArgs(entity, entity.KnownPosition, entity.Text, entity.Level, player));
                return(null);
            }
            return(packet);
        }
Beispiel #3
0
        public static NpcCore GetNpc(string uniType)
        {
            NpcCore Npc = Npcs.FirstOrDefault(npc => npc.Value.UniType == uniType).Value;

            return(Npc);
        }