• Visit Rebornbuddy
  • What does bOOCBuff do?

    Discussion in 'Archives' started by Pkt, Oct 16, 2012.

    1. Pkt

      Pkt New Member

      Joined:
      Oct 1, 2012
      Messages:
      37
      Likes Received:
      0
      Trophy Points:
      0
      I've been tweaking with trinity's code for a while now, and noticed that most of the skill control conditionals have bOOCBuff (or !bOOCBuff) in it.
      I always assumed this boolean had something to do with casting buffs out of combat or something. But today I made a search for it and found 121 hits for it in GilesTrinity.cs ... 120 of them are inside conditional, and there is just a "bool bOOCBuff = false". As far as I can see, there's no instruction to change its value anywhere else in the code.
      Is this an old variable no longer used or am I missing something?
       
    2. GilesSmith

      GilesSmith New Member

      Joined:
      Jun 2, 2012
      Messages:
      1,564
      Likes Received:
      34
      Trophy Points:
      0
      It's still very much used, and is so that different conditions can be met for casting spells out-of-combat (OOC).

      Where you have seen "bool bOOCBuff = false" is just as a default value for the function "GilesAbilitySelector". But if you look at the calls made to GilesAbilitySelector, you'll see that value is set to "True" for the code looking for out of combat buffs.

      It's important to have different checks for out of combat buffs also to prevent errors/crashes - since when out of combat, the object "targetCurrent" is *NULL* - meaning you have to be sure NOT to do any checks on values inside of it when looking for out of combat abilities to use.
       
    3. Pkt

      Pkt New Member

      Joined:
      Oct 1, 2012
      Messages:
      37
      Likes Received:
      0
      Trophy Points:
      0
      Ok, thanks for the answer Giles :)
       

    Share This Page