| 02-08-2009, 10:11 AM | #1 |
When I look over to the vJass spell section , most of the spells core area are done using the satic methods instead of private functions. Can anyone tell me why do people use static methods instead of private function and then setting the struct stuffs. |
| 02-08-2009, 11:00 AM | #2 |
They think its nicer and sometimes its just make sense to put everything into a struct... |
| 02-08-2009, 11:02 AM | #3 |
Those methods are not really static, its just a kind of workaround for not beeing allowed to use a non static method as a callback-function. So people use static methods and JASS:local structname this = structname(GetAttachedIntegerSomehow()) |
| 02-08-2009, 11:39 AM | #4 |
Just check output code... |
| 02-08-2009, 02:19 PM | #5 |
I think using static methods instead of functions is cleaner. It's an organized way of looking at the struct: the spell script is now an extension of the struct rather than the struct being an extension of the spell. That sounds weird, but it's personal preference, really. |
