示例#1
0
文件: MapNpc.cs 项目: Prosecutor/test
 public string GenerateIn(InRespawnType respawnType = InRespawnType.NoEffect)
 {
     if (!IsDisabled)
     {
         return(StaticPacketHelper.In(UserType.Npc, NpcVNum, MapNpcId, MapX, MapY, Position, 100, 100, Dialog, respawnType, IsSitting));
     }
     return(string.Empty);
 }
示例#2
0
        public string GenerateIn(InRespawnType respawnType = InRespawnType.NoEffect)
        {
            NpcMonster npcinfo = ServerManager.GetNpcMonster(NpcVNum);

            if (npcinfo == null || IsDisabled || !IsAlive)
            {
                return("");
            }
            IsOut = false;
            return(StaticPacketHelper.In(UserType.Npc, Npc.OriginalNpcMonsterVNum > 0 ? Npc.OriginalNpcMonsterVNum : NpcVNum, MapNpcId, MapX, MapY, Position, 100, 100, Dialog, respawnType, IsSitting, string.IsNullOrEmpty(Name) ? "-" : Name, Invisible));
        }
示例#3
0
        public static string In(UserType type, short callerVNum, long callerId, short mapX, short mapY, int direction, int currentHp, int currentMp, short dialog, InRespawnType respawnType, bool isSitting)
        {
            switch (type)
            {
            case UserType.Npc:
            case UserType.Monster:
                return($"in {(byte)type} {callerVNum} {callerId} {mapX} {mapY} {direction} {currentHp} {currentMp} {dialog} 0 0 -1 {(byte)respawnType} {(isSitting ? 1 : 0)} -1 - 0 -1 0 0 0 0 0 0 0 0");

            case UserType.Object:
                return($"in 9 {callerVNum} {callerId} {mapX} {mapY} {direction} 0 0 -1");

            default:
                return(string.Empty);
            }
        }