Пример #1
0
        public static void EnableLuckyDropEvent()
        {
            for (uint i = 0; i < 800; i++)
            {
                var npcTemplate = NPCMgr.GetEntry(i);
                if (npcTemplate == null)
                {
                    continue;
                }
                var newLootEntry = new Asda2NPCLootItemEntry();
                newLootEntry.ItemId   = (Asda2ItemId)36842;
                newLootEntry.Guid     = (int)i;
                newLootEntry.LootType = Asda2LootEntryType.Npc;
                newLootEntry.MonstrId = i;
                switch (npcTemplate.Rank)
                {
                case CreatureRank.Normal:
                    newLootEntry.DropChance = 6;
                    newLootEntry.MinAmount  = 1;
                    newLootEntry.MaxAmount  = 1;

                    break;

                case CreatureRank.Elite:
                    newLootEntry.DropChance = 6;
                    newLootEntry.MinAmount  = 1;
                    newLootEntry.MaxAmount  = 1;
                    break;

                case CreatureRank.Boss:
                    newLootEntry.DropChance = 6;
                    newLootEntry.MinAmount  = 1;
                    newLootEntry.MaxAmount  = 1;
                    break;

                case CreatureRank.WorldBoss:
                    newLootEntry.DropChance = 6;
                    newLootEntry.MinAmount  = 1;
                    newLootEntry.MaxAmount  = 1;
                    break;
                }
                newLootEntry.FinalizeDataHolder();
            }
        }
Пример #2
0
        public static void EnableLuckyDropEvent()
        {
            for (uint id = 0; id < 800U; ++id)
            {
                NPCEntry entry = NPCMgr.GetEntry(id);
                if (entry != null)
                {
                    Asda2NPCLootItemEntry npcLootItemEntry = new Asda2NPCLootItemEntry();
                    npcLootItemEntry.ItemId   = Asda2ItemId.U9036890;
                    npcLootItemEntry.Guid     = (int)id;
                    npcLootItemEntry.LootType = Asda2LootEntryType.Npc;
                    npcLootItemEntry.MonstrId = id;
                    switch (entry.Rank)
                    {
                    case CreatureRank.Normal:
                        npcLootItemEntry.DropChance = 40f;
                        npcLootItemEntry.MinAmount  = 1;
                        npcLootItemEntry.MaxAmount  = 5;
                        break;

                    case CreatureRank.Elite:
                        npcLootItemEntry.DropChance = 60f;
                        npcLootItemEntry.MinAmount  = 2;
                        npcLootItemEntry.MaxAmount  = 7;
                        break;

                    case CreatureRank.Boss:
                        npcLootItemEntry.DropChance = 80f;
                        npcLootItemEntry.MinAmount  = 4;
                        npcLootItemEntry.MaxAmount  = 8;
                        break;

                    case CreatureRank.WorldBoss:
                        npcLootItemEntry.DropChance = 100f;
                        npcLootItemEntry.MinAmount  = 5;
                        npcLootItemEntry.MaxAmount  = 10;
                        break;
                    }

                    npcLootItemEntry.FinalizeDataHolder();
                }
            }
        }