Пример #1
0
 public CritterUseSkillEventArgs(Critter cr, int skill, Critter on_cr, Item on_item, Scenery on_scenery)
     : base(cr)
 {
     this.Skill = skill;
     this.OnCr = on_cr;
     this.OnItem = on_item;
     this.OnScenery = on_scenery;
 }
Пример #2
0
 public CritterSmthUseSkillEventArgs(Critter cr, Critter from_cr, int skill, Critter on_cr, Item on_item, Scenery on_scenery)
     : base(cr, skill, on_cr, on_item, on_scenery)
 {
     this.From = from_cr;
 }
Пример #3
0
 public CritterUseItemEventArgs(Critter cr, Item item, Critter on_cr, Item on_item, Scenery on_scenery)
     : base(cr)
 {
     this.Item = item;
     this.OnCr = on_cr;
     this.OnItem = on_item;
     this.OnScenery = on_scenery;
 }
Пример #4
0
 public virtual bool EventUse(Critter cr, Critter on_critter, Item on_item, Scenery on_scenery)
 {
     return Item_EventUse(thisptr, cr.ThisPtr, (IntPtr)on_critter, (IntPtr)on_item, (IntPtr)on_scenery);
 }
Пример #5
0
 public CritterSmthUseItemEventArgs(Critter cr, Critter from_cr, Item item, Critter on_cr, Item on_item, Scenery on_scenery)
     : base(cr, item, on_cr, on_item, on_scenery)
 {
     this.From = from_cr;
 }
Пример #6
0
 public virtual bool EventUseItem(Item item, Critter on_critter, Item on_item, Scenery on_scenery)
 {
     return Crit_EventUseItem(thisptr, item.ThisPtr,
         on_critter != null ? on_critter.ThisPtr : IntPtr.Zero,
         on_item != null ? on_item.ThisPtr : IntPtr.Zero,
         on_scenery != null ? on_scenery.ThisPtr : IntPtr.Zero);
 }
Пример #7
0
 public virtual bool EventUseSkill(int skill, Critter on_critter, Item on_item, Scenery on_scenery)
 {
     return Crit_EventUseSkill(thisptr, skill,
         on_critter != null ? on_critter.ThisPtr : IntPtr.Zero,
         on_item != null ? on_item.ThisPtr : IntPtr.Zero,
         on_scenery != null ? on_scenery.ThisPtr : IntPtr.Zero);
 }
Пример #8
0
 public virtual void EventSmthUseItem(Critter from_cr, Item item, Critter on_critter, Item on_item, Scenery on_scenery)
 {
     Crit_EventSmthUseItem(thisptr, from_cr.ThisPtr, item.ThisPtr,
         on_critter != null ? on_critter.ThisPtr : IntPtr.Zero,
         on_item != null ? on_item.ThisPtr : IntPtr.Zero,
         on_scenery != null ? on_scenery.ThisPtr : IntPtr.Zero);
 }
Пример #9
0
 public ItemUseEventArgs(Item item, Critter cr, Critter on_critter, Item on_item, Scenery on_scenery)
     : base(item)
 {
     this.Cr = cr;
     this.OnCritter = on_critter;
     this.OnItem = on_item;
     this.OnScenery = on_scenery;
 }
Пример #10
0
 // called by engine
 static bool RaiseCritterUseSkill(Critter cr, int skill,
     Critter target_cr, Item target_item, Scenery target_scen)
 {
     CritterUseSkillEventArgs e = null;
     if (CritterUseSkill != null)
     {
         e = new CritterUseSkillEventArgs(cr, skill, target_cr, target_item, target_scen);
         CritterUseSkill(null, e);
     }
     return e != null ? e.Prevent : false;
 }
Пример #11
0
 // called by engine
 static bool RaiseCritterUseItem(Critter cr, Item item,
     Critter target_cr, Item target_item, Scenery target_scen, uint param)
 {
     GlobalCritterUseItemEventArgs e = null;
     if (CritterUseItem != null)
     {
         e = new GlobalCritterUseItemEventArgs(cr, item, target_cr, target_item, target_scen, param);
         CritterUseItem(null, e);
     }
     return e != null ? e.Prevent : false;
 }
Пример #12
0
 public GlobalCritterUseItemEventArgs(Critter cr, Item item, Critter on_cr, Item on_item, Scenery on_scen, uint param)
     : base(cr, item, on_cr, on_item, on_scen)
 {
     this.Param = param;
 }