コード例 #1
0
ファイル: NPCCommand.cs プロジェクト: 0xFh/Asda2-Project
 public override void Process(CmdTrigger <RealmServerCmdArgs> trigger)
 {
     if (trigger.Args.Character.Target == null)
     {
         trigger.Reply("Select target.");
     }
     else
     {
         NPC target = trigger.Args.Character.Target as NPC;
         if (target == null)
         {
             trigger.Reply("You must select a monstr.");
         }
         else
         {
             trigger.Reply("Target is {0},", (object)target);
             foreach (Asda2LootItemEntry entry in Asda2LootMgr.GetEntries(Asda2LootEntryType.Npc,
                                                                          target.EntryId))
             {
                 trigger.Reply("{0} [{1}] [{2}-{3}] [{4}]", (object)entry.ItemId,
                               (object)(int)entry.ItemId, (object)entry.MinAmount, (object)entry.MaxAmount,
                               (object)entry.DropChance.ToString(CultureInfo.InvariantCulture)
                               .Replace('0', 'O'), (object)entry.RequiredQuestId);
             }
         }
     }
 }
コード例 #2
0
ファイル: GOEntry.cs プロジェクト: 0xFh/Asda2-Project
 public override List <Asda2LootItemEntry> GetLootEntries()
 {
     if (this is IGOLootableEntry)
     {
         return(Asda2LootMgr.GetEntries(Asda2LootEntryType.Npc, Id));
     }
     return(null);
 }
コード例 #3
0
            public override void Process(CmdTrigger <RealmServerCmdArgs> trigger)
            {
                if (trigger.Args.Character.Target == null)
                {
                    trigger.Reply("Select target.");
                    return;
                }

                var target = trigger.Args.Character.Target as NPC;

                if (target == null)
                {
                    trigger.Reply("You must select a monstr.");
                    return;
                }
                trigger.Reply("Target is {0},", target);
                var loot = Asda2LootMgr.GetEntries(Asda2LootEntryType.Npc, target.EntryId);

                foreach (var item in loot)
                {
                    trigger.Reply("{0} [{1}] [{2}-{3}] [{4}]", item.ItemId, (int)item.ItemId, item.MinAmount, item.MaxAmount, item.DropChance.ToString(System.Globalization.CultureInfo.InvariantCulture).Replace('0', 'O'), item.RequiredQuestId);
                }
            }
コード例 #4
0
 public override List <Asda2LootItemEntry> GetLootEntries()
 {
     return(Asda2LootMgr.GetEntries(Asda2LootEntryType.Npc, Id));
 }