#W# Initial Commit: Avatars Conquest
This commit is contained in:
commit
5df497787a
7510 changed files with 416048 additions and 0 deletions
464
Scripts/Items/Skill Items/Misc/Bandage.cs
Normal file
464
Scripts/Items/Skill Items/Misc/Bandage.cs
Normal file
|
|
@ -0,0 +1,464 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Gumps;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Bandage : Item, IDyable
|
||||
{
|
||||
public static int Range = 1;
|
||||
|
||||
public override double DefaultWeight
|
||||
{
|
||||
get { return 0.1; }
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Bandage() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Bandage( int amount ) : base( 0xE21 )
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public Bandage( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public virtual bool Dye( Mobile from, DyeTub sender )
|
||||
{
|
||||
if ( Deleted )
|
||||
return false;
|
||||
|
||||
Hue = sender.DyedHue;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( from.InRange( GetWorldLocation(), Range ) )
|
||||
{
|
||||
from.RevealingAction();
|
||||
|
||||
from.SendLocalizedMessage( 500948 ); // Who will you use the bandages on?
|
||||
|
||||
from.Target = new InternalTarget( this );
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 500295 ); // You are too far away to do that.
|
||||
}
|
||||
}
|
||||
|
||||
private class InternalTarget : Target
|
||||
{
|
||||
private Bandage m_Bandage;
|
||||
|
||||
public InternalTarget( Bandage bandage ) : base( Bandage.Range, false, TargetFlags.Beneficial )
|
||||
{
|
||||
m_Bandage = bandage;
|
||||
}
|
||||
|
||||
protected override void OnTarget( Mobile from, object targeted )
|
||||
{
|
||||
if ( m_Bandage.Deleted )
|
||||
return;
|
||||
|
||||
if ( targeted is Mobile )
|
||||
{
|
||||
if ( from.InRange( m_Bandage.GetWorldLocation(), Bandage.Range ) )
|
||||
{
|
||||
if ( BandageContext.BeginHeal( from, (Mobile)targeted ) != null )
|
||||
{
|
||||
m_Bandage.Consume();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 500295 ); // You are too far away to do that.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 500970 ); // Bandages can not be used on that.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class BandageContext
|
||||
{
|
||||
private Mobile m_Healer;
|
||||
private Mobile m_Patient;
|
||||
private int m_Slips;
|
||||
private Timer m_Timer;
|
||||
|
||||
public Mobile Healer{ get{ return m_Healer; } }
|
||||
public Mobile Patient{ get{ return m_Patient; } }
|
||||
public int Slips{ get{ return m_Slips; } set{ m_Slips = value; } }
|
||||
public Timer Timer{ get{ return m_Timer; } }
|
||||
|
||||
public void Slip()
|
||||
{
|
||||
m_Healer.SendLocalizedMessage( 500961 ); // Your fingers slip!
|
||||
++m_Slips;
|
||||
}
|
||||
|
||||
public BandageContext( Mobile healer, Mobile patient, TimeSpan delay )
|
||||
{
|
||||
m_Healer = healer;
|
||||
m_Patient = patient;
|
||||
|
||||
m_Timer = new InternalTimer( this, delay );
|
||||
m_Timer.Start();
|
||||
}
|
||||
|
||||
public void StopHeal()
|
||||
{
|
||||
m_Table.Remove( m_Healer );
|
||||
|
||||
if ( m_Timer != null )
|
||||
m_Timer.Stop();
|
||||
|
||||
m_Timer = null;
|
||||
}
|
||||
|
||||
private static Dictionary<Mobile, BandageContext> m_Table = new Dictionary<Mobile, BandageContext>();
|
||||
|
||||
public static BandageContext GetContext( Mobile healer )
|
||||
{
|
||||
BandageContext bc = null;
|
||||
m_Table.TryGetValue( healer, out bc );
|
||||
return bc;
|
||||
}
|
||||
|
||||
public static SkillName GetPrimarySkill( Mobile m )
|
||||
{
|
||||
return SkillName.Healing;
|
||||
}
|
||||
|
||||
public static SkillName GetSecondarySkill( Mobile m )
|
||||
{
|
||||
return SkillName.Healing;
|
||||
}
|
||||
|
||||
public void EndHeal()
|
||||
{
|
||||
StopHeal();
|
||||
|
||||
int healerNumber = -1, patientNumber = -1;
|
||||
bool playSound = true;
|
||||
bool checkSkills = false;
|
||||
|
||||
SkillName primarySkill = GetPrimarySkill( m_Patient );
|
||||
SkillName secondarySkill = GetSecondarySkill( m_Patient );
|
||||
|
||||
BaseCreature petPatient = m_Patient as BaseCreature;
|
||||
|
||||
bool guild = false;
|
||||
if ( m_Healer is PlayerMobile )
|
||||
{
|
||||
PlayerMobile pm = (PlayerMobile)m_Healer;
|
||||
|
||||
if ( pm.NpcGuild == NpcGuild.HealersGuild )
|
||||
guild = true;
|
||||
}
|
||||
|
||||
if ( !m_Healer.Alive )
|
||||
{
|
||||
healerNumber = 500962; // You were unable to finish your work before you died.
|
||||
patientNumber = -1;
|
||||
playSound = false;
|
||||
}
|
||||
else if ( !m_Healer.InRange( m_Patient, Bandage.Range ) )
|
||||
{
|
||||
healerNumber = 500963; // You did not stay close enough to heal your target.
|
||||
patientNumber = -1;
|
||||
playSound = false;
|
||||
}
|
||||
else if ( !guild && ( !m_Patient.Alive || (petPatient != null && petPatient.IsDeadPet) ) )
|
||||
{
|
||||
healerNumber = 500966; // You are unable to resurrect your patient.
|
||||
patientNumber = -1;
|
||||
playSound = false;
|
||||
}
|
||||
else if ( !m_Patient.Alive || (petPatient != null && petPatient.IsDeadPet) )
|
||||
{
|
||||
double healing = m_Healer.Skills[primarySkill].Value;
|
||||
double anatomy = m_Healer.Skills[secondarySkill].Value;
|
||||
double chance = ((healing - 68.0) / 50.0) - (m_Slips * 0.02);
|
||||
|
||||
if (( (checkSkills = (healing >= 80.0 && anatomy >= 80.0)) && chance > Utility.RandomDouble() ) )
|
||||
{
|
||||
if ( m_Patient.Map == null || !m_Patient.Map.CanFit( m_Patient.Location, 16, false, false ) )
|
||||
{
|
||||
healerNumber = 501042; // Target can not be resurrected at that location.
|
||||
patientNumber = 502391; // Thou can not be resurrected there!
|
||||
}
|
||||
else
|
||||
{
|
||||
healerNumber = 500965; // You are able to resurrect your patient.
|
||||
patientNumber = -1;
|
||||
|
||||
m_Patient.PlaySound( 0x214 );
|
||||
m_Patient.FixedEffect( 0x376A, 10, 16 );
|
||||
|
||||
if ( petPatient != null && petPatient.IsDeadPet )
|
||||
{
|
||||
Mobile master = petPatient.ControlMaster;
|
||||
|
||||
if( master != null && m_Healer == master )
|
||||
{
|
||||
petPatient.ResurrectPet();
|
||||
|
||||
for ( int i = 0; i < petPatient.Skills.Length; ++i )
|
||||
{
|
||||
petPatient.Skills[i].Base -= 0.1;
|
||||
}
|
||||
}
|
||||
else if ( master != null && master.InRange( petPatient, 3 ) )
|
||||
{
|
||||
healerNumber = 503255; // You are able to resurrect the creature.
|
||||
|
||||
master.CloseGump( typeof( PetResurrectGump ) );
|
||||
master.SendGump( new PetResurrectGump( m_Healer, petPatient ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
bool found = false;
|
||||
|
||||
List<Mobile> friends = petPatient.Friends;
|
||||
|
||||
for ( int i = 0; friends != null && i < friends.Count; ++i )
|
||||
{
|
||||
Mobile friend = friends[i];
|
||||
|
||||
if ( friend.InRange( petPatient, 3 ) )
|
||||
{
|
||||
healerNumber = 503255; // You are able to resurrect the creature.
|
||||
|
||||
friend.CloseGump( typeof( PetResurrectGump ) );
|
||||
friend.SendGump( new PetResurrectGump( m_Healer, petPatient ) );
|
||||
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( !found )
|
||||
healerNumber = 1049670; // The pet's owner must be nearby to attempt resurrection.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Patient.CloseGump( typeof( ResurrectGump ) );
|
||||
m_Patient.SendGump( new ResurrectGump( m_Patient, m_Healer ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( petPatient != null && petPatient.IsDeadPet )
|
||||
healerNumber = 503256; // You fail to resurrect the creature.
|
||||
else
|
||||
healerNumber = 500966; // You are unable to resurrect your patient.
|
||||
|
||||
patientNumber = -1;
|
||||
}
|
||||
}
|
||||
else if ( m_Patient.Poisoned )
|
||||
{
|
||||
m_Healer.SendLocalizedMessage( 500969 ); // You finish applying the bandages.
|
||||
|
||||
double healing = m_Healer.Skills[primarySkill].Value;
|
||||
double anatomy = m_Healer.Skills[secondarySkill].Value;
|
||||
double chance = ((healing - 30.0) / 50.0) - (m_Patient.Poison.Level * 0.1) - (m_Slips * 0.02);
|
||||
|
||||
if ( (checkSkills = (healing >= 60.0 && anatomy >= 60.0)) && chance > Utility.RandomDouble() )
|
||||
{
|
||||
if ( m_Patient.CurePoison( m_Healer ) )
|
||||
{
|
||||
healerNumber = (m_Healer == m_Patient) ? -1 : 1010058; // You have cured the target of all poisons.
|
||||
patientNumber = 1010059; // You have been cured of all poisons.
|
||||
}
|
||||
else
|
||||
{
|
||||
healerNumber = -1;
|
||||
patientNumber = -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
healerNumber = 1010060; // You have failed to cure your target!
|
||||
patientNumber = -1;
|
||||
}
|
||||
}
|
||||
else if ( m_Patient.Hits == m_Patient.HitsMax )
|
||||
{
|
||||
healerNumber = 500967; // You heal what little damage your patient had.
|
||||
patientNumber = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
checkSkills = true;
|
||||
patientNumber = -1;
|
||||
|
||||
double healing = m_Healer.Skills[primarySkill].Value;
|
||||
double anatomy = m_Healer.Skills[secondarySkill].Value;
|
||||
double chance = ((healing + 10.0) / 100.0) - (m_Slips * 0.02);
|
||||
|
||||
if ( chance > Utility.RandomDouble() )
|
||||
{
|
||||
healerNumber = 500969; // You finish applying the bandages.
|
||||
|
||||
double min, max;
|
||||
|
||||
min = (anatomy / 5.0) + (healing / 5.0) + 3.0;
|
||||
max = (anatomy / 5.0) + (healing / 2.0) + 10.0;
|
||||
|
||||
double toHeal = min + (Utility.RandomDouble() * (max - min));
|
||||
|
||||
if ( m_Patient.Body.IsMonster || m_Patient.Body.IsAnimal )
|
||||
toHeal += m_Patient.HitsMax / 100;
|
||||
|
||||
toHeal -= m_Slips * 4;
|
||||
|
||||
if ( m_Patient is PlayerMobile ){ toHeal = (int)(toHeal * Server.Misc.Settings.HitPoints()); }
|
||||
|
||||
if ( toHeal < 1 )
|
||||
{
|
||||
toHeal = 1;
|
||||
healerNumber = 500968; // You apply the bandages, but they barely help.
|
||||
}
|
||||
|
||||
m_Patient.Heal( (int) toHeal, m_Healer, false );
|
||||
}
|
||||
else
|
||||
{
|
||||
healerNumber = 500968; // You apply the bandages, but they barely help.
|
||||
playSound = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ( healerNumber != -1 )
|
||||
m_Healer.SendLocalizedMessage( healerNumber );
|
||||
|
||||
if ( patientNumber != -1 )
|
||||
m_Patient.SendLocalizedMessage( patientNumber );
|
||||
|
||||
if ( playSound )
|
||||
m_Patient.PlaySound( 0x57 );
|
||||
|
||||
if ( checkSkills )
|
||||
{
|
||||
m_Healer.CheckSkill( secondarySkill, 0.0, 120.0 );
|
||||
m_Healer.CheckSkill( primarySkill, 0.0, 120.0 );
|
||||
}
|
||||
}
|
||||
|
||||
private class InternalTimer : Timer
|
||||
{
|
||||
private BandageContext m_Context;
|
||||
|
||||
public InternalTimer( BandageContext context, TimeSpan delay ) : base( delay )
|
||||
{
|
||||
m_Context = context;
|
||||
Priority = TimerPriority.FiftyMS;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
m_Context.EndHeal();
|
||||
}
|
||||
}
|
||||
|
||||
public static BandageContext BeginHeal( Mobile healer, Mobile patient )
|
||||
{
|
||||
bool isDeadPet = ( patient is BaseCreature && ((BaseCreature)patient).IsDeadPet );
|
||||
|
||||
if ( patient is Golem )
|
||||
{
|
||||
healer.SendLocalizedMessage( 500970 ); // Bandages cannot be used on that.
|
||||
}
|
||||
else if ( patient is PlayerMobile && patient.Hunger < 5 )
|
||||
{
|
||||
healer.SendMessage( "One cannot be healed when they are starving!" );
|
||||
}
|
||||
else if ( !patient.Poisoned && patient.Hits == patient.HitsMax && !isDeadPet )
|
||||
{
|
||||
healer.SendLocalizedMessage( 500955 ); // That being is not damaged!
|
||||
}
|
||||
else if ( !patient.Alive && (patient.Map == null || !patient.Map.CanFit( patient.Location, 16, false, false )) )
|
||||
{
|
||||
healer.SendLocalizedMessage( 501042 ); // Target cannot be resurrected at that location.
|
||||
}
|
||||
else if ( healer.CanBeBeneficial( patient, true, true ) )
|
||||
{
|
||||
healer.DoBeneficial( patient );
|
||||
|
||||
bool onSelf = ( healer == patient );
|
||||
int dex = healer.Dex;
|
||||
|
||||
double seconds;
|
||||
double resDelay = ( patient.Alive ? 0.0 : 5.0 );
|
||||
|
||||
if ( onSelf )
|
||||
{
|
||||
seconds = 9.4 + (0.6 * ((double)(120 - dex) / 10));
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( dex >= 100 )
|
||||
seconds = 3.0 + resDelay;
|
||||
else if ( dex >= 40 )
|
||||
seconds = 4.0 + resDelay;
|
||||
else
|
||||
seconds = 5.0 + resDelay;
|
||||
}
|
||||
|
||||
BandageContext context = GetContext( healer );
|
||||
|
||||
if ( context != null )
|
||||
context.StopHeal();
|
||||
seconds *= 1000;
|
||||
|
||||
context = new BandageContext( healer, patient, TimeSpan.FromMilliseconds( seconds ) );
|
||||
|
||||
m_Table[healer] = context;
|
||||
|
||||
if ( !onSelf )
|
||||
patient.SendLocalizedMessage( 1008078, false, healer.Name ); // : Attempting to heal you.
|
||||
|
||||
|
||||
healer.SendLocalizedMessage( 500956 ); // You begin applying the bandages.
|
||||
return context;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
199
Scripts/Items/Skill Items/Misc/FireHorn.cs
Normal file
199
Scripts/Items/Skill Items/Misc/FireHorn.cs
Normal file
|
|
@ -0,0 +1,199 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
using Server.Targeting;
|
||||
using Server.Spells;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class FireHorn : Item
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1060456; } } // fire horn
|
||||
|
||||
[Constructable]
|
||||
public FireHorn() : base( 0xFC7 )
|
||||
{
|
||||
ItemID = Utility.RandomList( 0x10E0, 0x10F4 );
|
||||
Hue = 0x4A1;
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public FireHorn( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
private bool CheckUse( Mobile from )
|
||||
{
|
||||
if ( !this.IsAccessibleTo( from ) )
|
||||
return false;
|
||||
|
||||
if ( from.Map != this.Map || !from.InRange( GetWorldLocation(), 2 ) )
|
||||
{
|
||||
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that.
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( !from.CanBeginAction( typeof( FireHorn ) ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 1049615 ); // You must take a moment to catch your breath.
|
||||
return false;
|
||||
}
|
||||
|
||||
int sulfAsh = 15;
|
||||
if ( from.Backpack == null || from.Backpack.GetAmount( typeof( SulfurousAsh ) ) < sulfAsh )
|
||||
{
|
||||
from.SendLocalizedMessage( 1049617 ); // You do not have enough sulfurous ash.
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( CheckUse( from ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 1049620 ); // Select an area to incinerate.
|
||||
from.Target = new InternalTarget( this );
|
||||
}
|
||||
}
|
||||
|
||||
public void Use( Mobile from, IPoint3D loc )
|
||||
{
|
||||
if ( !CheckUse( from ) )
|
||||
return;
|
||||
|
||||
from.BeginAction( typeof( FireHorn ) );
|
||||
Timer.DelayCall( TimeSpan.FromSeconds( 12.0 ), new TimerStateCallback( EndAction ), from );
|
||||
|
||||
int music = from.Skills[SkillName.Musicianship].Fixed;
|
||||
|
||||
int sucChance = 500 + ( music - 775 ) * 2;
|
||||
double dSucChance = ((double)sucChance) / 1000.0;
|
||||
|
||||
if ( !from.CheckSkill( SkillName.Musicianship, dSucChance ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 1049618 ); // The horn emits a pathetic squeak.
|
||||
from.PlaySound( 0x18A );
|
||||
return;
|
||||
}
|
||||
|
||||
int sulfAsh = 15;
|
||||
from.Backpack.ConsumeUpTo( typeof( SulfurousAsh ), sulfAsh );
|
||||
|
||||
from.PlaySound( 0x15F );
|
||||
Effects.SendPacket( from, from.Map, new HuedEffect( EffectType.Moving, from.Serial, Serial.Zero, 0x36D4, from.Location, loc, 5, 0, false, true, 0, 0 ) );
|
||||
|
||||
ArrayList targets = new ArrayList();
|
||||
bool playerVsPlayer = false;
|
||||
|
||||
IPooledEnumerable eable = from.Map.GetMobilesInRange( new Point3D( loc ), 2 );
|
||||
|
||||
foreach ( Mobile m in eable )
|
||||
{
|
||||
if ( from != m && SpellHelper.ValidIndirectTarget( from, m ) && from.CanBeHarmful( m, false ) )
|
||||
{
|
||||
targets.Add( m );
|
||||
|
||||
if ( m.Player )
|
||||
playerVsPlayer = true;
|
||||
}
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
|
||||
if ( targets.Count > 0 )
|
||||
{
|
||||
int prov = from.Skills[SkillName.Provocation].Fixed;
|
||||
int disc = from.Skills[SkillName.Discordance].Fixed;
|
||||
int peace = from.Skills[SkillName.Peacemaking].Fixed;
|
||||
|
||||
int minDamage, maxDamage;
|
||||
|
||||
int total = prov + disc / 5 + peace / 5;
|
||||
|
||||
if ( playerVsPlayer )
|
||||
total /= 3;
|
||||
|
||||
maxDamage = ( total * 2 ) / 30;
|
||||
minDamage = ( maxDamage * 7 ) / 10;
|
||||
|
||||
double damage = Utility.RandomMinMax( minDamage, maxDamage );
|
||||
|
||||
damage /= targets.Count;
|
||||
|
||||
for ( int i = 0; i < targets.Count; ++i )
|
||||
{
|
||||
Mobile m = (Mobile)targets[i];
|
||||
|
||||
double toDeal = damage;
|
||||
|
||||
if ( m.CheckSkill( SkillName.MagicResist, 0.0, 120.0 ) )
|
||||
{
|
||||
toDeal *= 0.5;
|
||||
m.SendLocalizedMessage( 501783 ); // You feel yourself resisting magical energy.
|
||||
}
|
||||
|
||||
from.DoHarmful( m );
|
||||
SpellHelper.Damage( TimeSpan.Zero, m, from, toDeal );
|
||||
|
||||
Effects.SendTargetEffect( m, 0x3709, 10, 30 );
|
||||
}
|
||||
}
|
||||
|
||||
double breakChance = 0.16;
|
||||
if ( Utility.RandomDouble() < breakChance )
|
||||
{
|
||||
from.SendLocalizedMessage( 1049619 ); // The fire horn crumbles in your hands.
|
||||
this.Delete();
|
||||
}
|
||||
}
|
||||
|
||||
private static void EndAction( object state )
|
||||
{
|
||||
Mobile m = (Mobile) state;
|
||||
|
||||
m.EndAction( typeof( FireHorn ) );
|
||||
m.SendLocalizedMessage( 1049621 ); // You catch your breath.
|
||||
}
|
||||
|
||||
private class InternalTarget : Target
|
||||
{
|
||||
private FireHorn m_Horn;
|
||||
|
||||
public InternalTarget( FireHorn horn ) : base( 2, true, TargetFlags.Harmful )
|
||||
{
|
||||
m_Horn = horn;
|
||||
}
|
||||
|
||||
protected override void OnTarget( Mobile from, object targeted )
|
||||
{
|
||||
if ( m_Horn.Deleted )
|
||||
return;
|
||||
|
||||
IPoint3D loc;
|
||||
if ( targeted is Item )
|
||||
loc = ((Item)targeted).GetWorldLocation();
|
||||
else
|
||||
loc = targeted as IPoint3D;
|
||||
|
||||
m_Horn.Use( from, loc );
|
||||
}
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue