Gilderoy
New Member
- Joined
- May 10, 2010
- Messages
- 761
- Reaction score
- 16
Hi all, Developers 
So, i'm tryng to rewrite UltimatePalaHealer using the TreeSharp couse actualy the CC is king on the edge of slowness and everyone told me "just rewrite it using TreeSharp!"
Well, i understanded something about TreeSharp i suppose, how decorator work, priority selector ecc ecc.
what i do _not_ understand is how to create the bone of the cc.
i'll try to explain better.
with the normal way if you want something to be done by the cc in combat you write something like
Now, problem is, CC that use TreeSharp do not even have a public overwtrite combat() function.. so how can i tell the CC what part of the code to execute when?
i get i must write something like
well, and now where do i put this code?
How do i call for this code to be executed?
cannot seem to understand..
must i declare something like a stranting node of the tree to be navigated? has to be called in some special way? or what?

So, i'm tryng to rewrite UltimatePalaHealer using the TreeSharp couse actualy the CC is king on the edge of slowness and everyone told me "just rewrite it using TreeSharp!"
Well, i understanded something about TreeSharp i suppose, how decorator work, priority selector ecc ecc.
what i do _not_ understand is how to create the bone of the cc.
i'll try to explain better.
with the normal way if you want something to be done by the cc in combat you write something like
Code:
public overwrite void combat ()
{
if(condizion1){do something}
else if(condition2){do something else}
}
i get i must write something like
Code:
public composite CreateBehavior_palaheal()
{
return (
new PrioritySelector(
new decorator(ret=>condition1, new Action(do something));
new decorator(ret=>condition2, new Action(do something));
)
);
}
How do i call for this code to be executed?
cannot seem to understand..
must i declare something like a stranting node of the tree to be navigated? has to be called in some special way? or what?
Last edited: