示例#1
0
 public Junk(
     Schema.TemplateItemJunkRow junk,
     Schema.TemplateItemRow item,
     Schema.TemplateObjectRow template,
     Schema.ObjectInstanceRow instance
     ) : base(item, template, instance)
 {
 }
示例#2
0
 public Wieldable(
     Schema.TemplateItemWieldableRow wieldable,
     Schema.TemplateItemRow item,
     Schema.TemplateObjectRow template,
     Schema.ObjectInstanceRow instance
     ) : base(item, template, instance)
 {
 }
示例#3
0
 public Readable(
     Schema.TemplateItemReadableRow readable,
     Schema.TemplateItemRow item,
     Schema.TemplateObjectRow template,
     Schema.ObjectInstanceRow instance
     ) : base(item, template, instance)
 {
 }
示例#4
0
 public Quaffable(
     Schema.TemplateItemQuaffableRow quaffable,
     Schema.TemplateItemRow item,
     Schema.TemplateObjectRow template,
     Schema.ObjectInstanceRow instance
     ) : base(item, template, instance)
 {
 }
示例#5
0
 public Terrain(
     Schema.TemplateTerrainRow terrain,
     Schema.TemplateObjectRow template,
     Schema.ObjectInstanceRow instance
     )
     : base(template, instance)
 {
     TerrainType = (EnumTerrainType)terrain.EnumTerrainTypeID;
 }
示例#6
0
 public MobileAvatar(
     World world,
     Schema.TemplateMobileRow mobile,
     Schema.TemplateObjectRow template,
     Schema.ObjectInstanceRow instance
     )
     : base(mobile, template, instance)
 {
     World = world;
 }
示例#7
0
 public Equipable(
     Schema.TemplateItemEquipableRow equipable,
     Schema.TemplateItemRow item,
     Schema.TemplateObjectRow template,
     Schema.ObjectInstanceRow instance
     ) : base(item, template, instance)
 {
     ArmourClass    = equipable.ArmourClass;
     WearLocationID = (EnumWearLocation)equipable.EnumWearLocationID;
 }
示例#8
0
 public PhysicalObject(
     Schema.TemplateObjectRow template,
     Schema.ObjectInstanceRow instance
     )
 {
     ObjectInstanceId   = instance.ObjectInstanceID;
     TemplateObjectId   = template.TemplateObjectID;
     TemplateObjectName = template.TemplateObjectName;
     Position           = new Vector3D(instance.X, instance.Y, instance.Z);
     Rotation           = new Quaternion(instance.RotationX, instance.RotationY, instance.RotationZ, instance.RotationW);
     ResourceId         = template.ResourceID;
     Height             = template.Height;
     // can we get r^2 from ResourceID?
     // TODO: make this the proper 3d radius^2
     // store it in the database
     BoundingSphereRadiusSquared = 1;
 }
示例#9
0
 public MobileAvatar LoadMobile(int instanceId)
 {
     Schema.ObjectInstanceRow rpr = Global.ModelSchema.ObjectInstance.FindByObjectInstanceID(instanceId);
     if (rpr == null)
     {
         return(null);
     }
     Schema.TemplateObjectRow por = Global.ModelSchema.TemplateObject.FindByTemplateObjectID(rpr.TemplateObjectID);
     if (por == null)
     {
         return(null);
     }
     Schema.TemplateMobileRow mr = Global.ModelSchema.TemplateMobile.FindByTemplateObjectID(rpr.TemplateObjectID);
     if (mr == null)
     {
         return(null);
     }
     return(new MobileAvatar(this, mr, por, rpr));
 }
示例#10
0
 public Mobile(
     Schema.TemplateMobileRow mobile,
     Schema.TemplateObjectRow template,
     Schema.ObjectInstanceRow instance
     )
     : base(template, instance)
 {
     Level        = mobile.Level;
     Cognition    = mobile.Cognition;
     Willpower    = mobile.Willpower;
     Dexterity    = mobile.Dexterity;
     Strength     = mobile.Strength;
     Constitution = mobile.Constitution;
     Race         = (EnumRace)mobile.EnumRaceID;
     MobileSize   = (EnumMobileSize)mobile.EnumMobileSizeID;
     MobileState  = (EnumMobileState)mobile.EnumMobileStateID;
     MaxHitPoints = mobile.EnumMobileSizeID * 100 + Level * Constitution / 2;
     HitPoints    = (float)instance.HitpointsCurrent;
     MaxEnergy    = mobile.EnumMobileSizeID * 100 + Level * Constitution / 2;
     Energy       = (float)instance.EnergyCurrent;
     Possessable  = instance.GetMobilePossesableByPlayerRows().Length > 0;
 }