Example #1
0
 public void CheckStealObject(InteractObject obj, bool isLeavingZone)
 {
     InteractObject.ObjectType objectType = obj.objectType;
     if (objectType == InteractObject.ObjectType.Plante && characterOwner == PnjManager.CharacterType.Paysan)
     {
         if (isLeavingZone)
         {
             EventManager.Instance.UpdateEvent(EventDatabase.EventType.VolPlantePaysan, 1);
         }
         else
         {
             EventManager.Instance.UpdateEvent(EventDatabase.EventType.VolPlantePaysan, -1);
         }
     }
     else if (objectType == InteractObject.ObjectType.Fourche && characterOwner == PnjManager.CharacterType.Artisan)
     {
         if (isLeavingZone)
         {
             EventManager.Instance.UpdateEvent(EventDatabase.EventType.VolFourcheArtisan, 1);
         }
         else
         {
             EventManager.Instance.UpdateEvent(EventDatabase.EventType.VolFourcheArtisan, -1);
         }
     }
 }
Example #2
0
    public List <InteractObject> GetObjectOfType(InteractObject.ObjectType objectType, PnjManager.CharacterType pnj)
    {
        CleanListObject();
        List <InteractObject> result = new List <InteractObject>();

        foreach (var item in interactivesObjects)
        {
            if ((item.objectType == objectType) && (item.characterOwner == pnj))
            {
                result.Add(item);
            }
        }
        return(result);
    }