예제 #1
0
파일: NMB.cs 프로젝트: palome06/psd48
 public static ushort Encode(string code, MonsterLib ml, NPCLib nl)
 {
     if (code.StartsWith("G"))
         return CodeOfMonster(ml.Encode(code));
     else if (code.StartsWith("N"))
         return CodeOfNPC(nl.Encode(code));
     else
         return 0;
 }
예제 #2
0
파일: NMB.cs 프로젝트: palome06/psd48
 //public static bool IsDenger(ushort id)
 //{
 //    return id > 2000;
 //}
 public static NMB Decode(ushort id, MonsterLib ml, NPCLib nl)
 {
     if (id < 1000)
         return ml.Decode(id);
     else if (id > 1000 && id < 2000)
         return nl.Decode((ushort)(id - 1000));
     else
         return null;
 }
예제 #3
0
파일: LibGroup.cs 프로젝트: palome06/psd48
 public LibGroup()
 {
     HL = new HeroLib();
     TL = new TuxLib();
     NL = new NPCLib();
     ML = new MonsterLib();
     EL = new EvenementLib();
     SL = new SkillLib();
     ZL = new OperationLib();
     NJL = new NCActionLib();
     RL = new RuneLib();
     ESL = new ExspLib();
 }
예제 #4
0
파일: LibGroup.cs 프로젝트: palome06/psd48
 public LibGroup(HeroLib hl, TuxLib tl, NPCLib nl, MonsterLib ml, EvenementLib el,
     SkillLib sl, OperationLib zl, NCActionLib njl, RuneLib rl, ExspLib esl)
 {
     HL = hl; TL = tl; NL = nl; ML = ml; EL = el;
     SL = sl; ZL = zl; NJL = njl; RL = rl; ESL = esl;
 }
예제 #5
0
파일: NC303.cs 프로젝트: palome06/psd48
 public IDictionary<string, NPC> RegisterNPCDelegates(NPCLib lib)
 {
     NPCCottage njc = this;
     IDictionary<string, NPC> nj02 = new Dictionary<string, NPC>();
     foreach (NPC npc in lib.First)
     {
         nj02.Add(npc.Code, npc);
         string njCode = npc.Code;
         var methodDebut = njc.GetType().GetMethod(njCode + "Debut");
         if (methodDebut != null)
             npc.Debut += (player => { methodDebut.Invoke(njc, new object[] { player }); });
     }
     return nj02;
 }