Esempio n. 1
0
		public void FakeCast( int spell, Mobile target, float x, float y, float z, WhenDone trigger )
		{
			int offset = 4;
			Converter.ToBytes( Guid, tempBuff, ref offset );
			Converter.ToBytes( Guid, tempBuff, ref offset );
			Converter.ToBytes( spell, tempBuff, ref offset );
			BaseAbility ba = (BaseAbility)Abilities.abilities[ spell ];
			Converter.ToBytes( (ushort)0x100, tempBuff, ref offset );
			Converter.ToBytes( cast.castingtime, tempBuff, ref offset );
			Converter.ToBytes( cast.type = (ushort)0x40, tempBuff, ref offset );					
			Converter.ToBytes( spellTargetX = x, tempBuff, ref offset );
			Converter.ToBytes( spellTargetY = y, tempBuff, ref offset );
			Converter.ToBytes( spellTargetZ = z, tempBuff, ref offset );
			ToAllPlayerNear( OpCodes.SMSG_SPELL_START, tempBuff, offset );	

			CastFakeSpellTimer cfst = new CastFakeSpellTimer( this, target, spell, cast.castingtime, trigger );
		}
Esempio n. 2
0
		public void FakeCast( int spell, Mobile target, WhenDone trigger )
		{
			byte []buff = { 0,0, 0,0, 0xD9, 0xDB, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD9, 0xDB, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x03, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
			int offset = 4;
			
			Converter.ToBytes( target.Guid, buff, ref offset );
			Converter.ToBytes( Guid, buff, ref offset );
			Converter.ToBytes( spell, buff, ref offset );
			Converter.ToBytes( 0x100, buff, ref offset );
			Converter.ToBytes( 0, buff, ref offset );
			//if ( lastSeen != null && lastSeen.Player != null )
			ToAllPlayerNear( OpCodes.SMSG_SPELL_START, buff, buff.Length );
			/*else
					if ( this is Character )
					( this as Character ).Player.ToAllPlayerNear( OpCodes.SMSG_SPELL_START, buff, buff.Length );
				else
					if ( SummonedBy != null )
					( SummonedBy as Character ).Player.ToAllPlayerNear( OpCodes.SMSG_SPELL_START, buff, buff.Length );
				else
					if ( target.SummonedBy != null )
					( target.SummonedBy as Character ).Player.ToAllPlayerNear( OpCodes.SMSG_SPELL_START, buff, buff.Length );
					*/
			CastFakeSpellTimer cfst = new CastFakeSpellTimer( this, target, spell, (int)Abilities.abilities[ spell ].CastingTime( this ), trigger );
			//Console.WriteLine( "Begin cast at {0}", DateTime.Now.Ticks );
		}