Example #1
0
 // called by engine
 bool RaiseUseSkill(int skill, Critter on_cr, Item on_item, IntPtr on_scenery)
 {
     if (UseSkill != null)
     {
         var e = new CritterUseSkillEventArgs(this, skill, on_cr, on_item, Scenery.FromNative(on_scenery));
         UseSkill(this, e);
         return(e.Prevent);
     }
     return(false);
 }
Example #2
0
 // called by engine
 internal bool RaiseUse(Critter cr, Critter on_critter, Item on_item, IntPtr on_scenery)
 {
     if (use != null)
     {
         var e = new ItemUseEventArgs(this, cr, on_critter, on_item, Scenery.FromNative(on_scenery));
         use(this, e);
         return(e.Prevent);
     }
     return(false);
 }
Example #3
0
 // called by engine
 bool RaiseUseItem(Item item, Critter on_cr, Item on_item, IntPtr on_scenery)
 {
     if (UseItem != null)
     {
         var e = new CritterUseItemEventArgs(this, item, on_cr, on_item, Scenery.FromNative(on_scenery));
         UseItem(this, e);
         return(e.Prevent);
     }
     return(false);
 }
Example #4
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);
        }
Example #5
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);
        }
Example #6
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;
 }
Example #7
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;
 }
Example #8
0
 // called by engine
 void RaiseSmthUseSkill(Critter from_cr, int skill, Critter on_cr, Item on_item, IntPtr on_scenery)
 {
     if (SmthUseSkill != null)
     {
         SmthUseSkill(this, new CritterSmthUseSkillEventArgs(this, from_cr, skill, on_cr, on_item, Scenery.FromNative(on_scenery)));
     }
 }
Example #9
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;
 }
Example #10
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;
 }
Example #11
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;
 }
Example #12
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;
 }
Example #13
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;
 }
Example #14
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;
 }
Example #15
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;
 }
Example #16
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;
 }
Example #17
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;
 }
Example #18
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;
 }
Example #19
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));
 }
 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);
 }
Example #21
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;
 }
 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);
 }
 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);
 }
Example #24
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);
 }
Example #25
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;
 }
Example #26
0
 // called by engine
 void RaiseSmthUseItem(Critter from_cr, Item item, Critter on_cr, Item on_item, IntPtr on_scenery)
 {
     if (SmthUseItem != null)
     {
         SmthUseItem(this, new CritterSmthUseItemEventArgs(this, from_cr, item, on_cr, on_item, Scenery.FromNative(on_scenery)));
     }
 }