nydehi / runuomondains

Automatically exported from code.google.com/p/runuomondains
0 stars 0 forks source link

FIX FOR ANT LION "Summon Moongate" ISSUE #26

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I didn't know where else to put this, but i also posted it on the posting in 
RUNUO forums.

The issue your package is having where Ant Lions are spawning "Summon 
Moongate"'s is because of AntLion.cs

One of your switch-case routines says (around line 76 if im not mistaken)

Code:
            if ( 0.07 >= Utility.RandomDouble() )
            {
                switch ( Utility.Random( 4 ) )
                {
                    case 0: PackItem( new UnknownBardSkeleton() ); break;
                    case 1: PackItem( new UnknownMageSkeleton() ); break;
                    case 2: PackItem( new UnknownRogueSkeleton() ); break;
                }
            }
Notice you are doing Random( 4 ) however you only provide three cases. When it 
DOES land on case 4, it is producing the "Summon Moongate" item in error.

Hope this was clear enough, there's another one off the bugged list.

Original issue reported on code.google.com by Ruin...@gmail.com on 16 Jun 2010 at 9:23

GoogleCodeExporter commented 9 years ago
Does not, in fact, fix the summon moongate item problem. Sorry for the hype.

Original comment by Ruin...@gmail.com on 16 Jun 2010 at 9:34

GoogleCodeExporter commented 9 years ago
After much testing it turned out to be the Skull.cs

using System;
using Server.Items;
using Server.Network;

namespace Server.Items
{
    [FlipableAttribute( 0x1AE0, 0x1AE1 )]
    public class Skull : Item
    {
        [Constructable]
        public Skull( ) : base( 0x1AE0 + Utility.Random( 8 ) )// 5 through 8 are summon moongate. Change it to utility.random( 4 ) and you're set.
        {
            Stackable = false;
            Weight = 1.0;
        }

        public Skull( Serial serial ) : base( serial )
        {
        }

        public override void Serialize( GenericWriter writer )
        {
            base.Serialize( writer );

            writer.WriteEncodedInt( 0 ); // version
        }

        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );

            int version = reader.ReadEncodedInt();
        }
    }
}

Original comment by Ruin...@gmail.com on 18 Jun 2010 at 7:36

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I have made the fix already just have not updated that file yet.

Original comment by ShaiTanMalkier@gmail.com on 4 Sep 2010 at 8:28