Shazzy

Member
I have checked, rechecked and for some reason this does NOT flip properly!
All my other Kings collection lights flip just fine:(
Is you see my stupid evil ways, please let me know how this can NOT work properly!
Thank for the assistance:]
Code:
using System;
using Server;

namespace Server.Items
{
 [Flipable]
 public class TallDoubleLamp : BaseLight
 {
 public override int LitItemID
 {
 get
 {
 if ( ItemID == 0x4C56 )//1
 return 0x4C57;//2
 else
 return 0x4C59;//4
 }
 }
 
 public override int UnlitItemID
 {
 get
 {
 if ( ItemID == 0x4C457 )//2
 return 0x4C56;//1
 else
 return 0x4C58;//3
 }
 }
 
 [Constructable]
 public TallDoubleLamp() : base( 0x4C56 )//1
 {
 Movable = true;
 Duration = TimeSpan.Zero; // Never burnt out
 Burning = false;
 Light = LightType.Circle300;
 Weight = 3.0;
 }

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

 public void Flip()
 {
 Light = LightType.Circle300;

 switch ( ItemID )
 {
 case 0x4C56: ItemID = 0x4C58; break;//unlit
 case 0x4C57: ItemID = 0x4C59; break;//lit

 case 0x4C58: ItemID = 0x4C56; break;//unlit
 case 0x4C59: ItemID = 0x4C57; break;//lit
 }
 }

 public override void Serialize( GenericWriter writer )
 {
 base.Serialize( writer );
 writer.Write( (int) 0 );
 }

 public override void Deserialize( GenericReader reader )
 {
 base.Deserialize( reader );
 int version = reader.ReadInt();
 }
 }
}
 

Attachments

  • TallDoubleLamp.cs
    1.3 KB · Views: 0
Was submitted by someone... Not sure where i got them tho :)
 

Attachments

  • TallDoubleLamp.cs
    1.3 KB · Views: 3
  • BirdLamp.cs
    1.2 KB · Views: 0
  • DragonLamp.cs
    1.3 KB · Views: 1
  • DragonLantern1.cs
    1.3 KB · Views: 0
  • KoiLamp.cs
    1.2 KB · Views: 0
  • StainedGlassLamp.cs
    782 bytes · Views: 0
  • TallLamp.cs
    1.2 KB · Views: 0
Last edited:
Yeah those might have been mine cause the scripts are identical, so your version has the same flipping issue :confused:
 
That worked, but I have no idea WHY because mine was the same but the order in the script was different, thanks!
 

Active Shards

Donations

Total amount
$80.00
Goal
$1,000.00
Back