· 10 years ago · Nov 11, 2015, 10:21 AM
1oct 06 10:10:46 <XuN__> here you have a little info
2oct 06 10:10:57 <XuN__> CBaseBaseDef is the main class for dynamic items/chars
3oct 06 10:10:59 <roberpot> and i continue with doc is ok :P
4oct 06 10:11:15 <roberpot> i saw yesterday on doxygen doc :P
5oct 06 10:11:22 <XuN__> this reads the code under the [CHARDEF ] and [ITEMDEF ] headers
6oct 06 10:11:26 <roberpot> generates graphs :D
7oct 06 10:11:31 <XuN__> does it has comments?
8oct 06 10:11:33 <XuN__> ok xD
9oct 06 10:11:38 <roberpot> but thx :D
10oct 06 10:11:49 <roberpot> i'll ask you many things ... so..... run!
11oct 06 10:11:50 <roberpot> :P
12oct 06 10:11:50 <XuN__> it mainly reads some generic data like name, baseid, etc
13oct 06 10:12:05 <XuN__> then it jumps to CObjBase
14oct 06 10:12:14 <XuN__> and it differs to CChar or CItem
15oct 06 10:12:21 <XuN__> the main point here are their virtuals
16oct 06 10:12:33 <XuN__> r_LoadVal, r_WriteVal, r_Verb, r_Write
17oct 06 10:13:02 <roberpot> one sec i'll open the file
18oct 06 10:13:38 <XuN__> r_Verb usually holds execution keywords like 'MULTICREATE' for multis, so when you type inscript new.multicreate it will jump to CItemMulti::r_Verb
19oct 06 10:13:51 <XuN__> and continue upwards if the given key is not found
20oct 06 10:14:22 <XuN__> this is used for executing commands which has no storage variables
21oct 06 10:14:35 <XuN__> r_LoadVal is the one to 'set' anything
22oct 06 10:14:41 <XuN__> src.str=100
23oct 06 10:14:49 <roberpot> ok
24oct 06 10:14:55 <XuN__> will call CChar::r_LoadVal() with key = str and val = 100
25oct 06 10:15:03 <roberpot> r_WriteVal is for getting a value?
26oct 06 10:15:06 <XuN__> the reverted for r_WriteVal
27oct 06 10:15:07 <XuN__> y
28oct 06 10:15:11 <roberpot> ok
29oct 06 10:15:16 <roberpot> so <src.str>
30oct 06 10:15:21 <roberpot> calls r_WriteVal
31oct 06 10:15:24 <XuN__> and r_Write is used to write on saves
32oct 06 10:15:38 <XuN__> each class generate it's own custom data
33oct 06 10:15:41 <XuN__> ie
34oct 06 10:15:57 <XuN__> CItem creates the [WORLDITEM ] header
35oct 06 10:16:01 <XuN__> uid, name ...
36oct 06 10:16:04 <roberpot> so r_* are virtual in base class ?
37oct 06 10:16:06 <roberpot> ah ok yes
38oct 06 10:16:07 <XuN__> if it differs from the default one
39oct 06 10:16:09 <XuN__> and
40oct 06 10:16:15 <XuN__> CItemMulti::r_Write
41oct 06 10:16:24 <XuN__> will generate also the COMPONENT=xxx
42oct 06 10:16:32 <roberpot> nice
43oct 06 10:16:56 <XuN__> this is the most basic info about scripting <-> source
44oct 06 10:17:23 <XuN__> in the /tables folder there are a lot of .tbl files
45oct 06 10:17:42 <XuN__> each file has it's own purpose, but basically each new keyword must be added there
46oct 06 10:18:11 <roberpot> ok
47oct 06 10:18:23 <roberpot> i'll take a look to tbl files
48oct 06 10:18:34 <XuN__> so if you want a new property for chars you'll have to open CChar_Props.tbl
49oct 06 10:18:39 <XuN__> and add it there
50oct 06 10:18:52 <XuN__> anything placed there MUST have alphabetical order
51oct 06 10:19:16 <XuN__> otherwise anything placed under the 'wrong placed' keyword will not be read in r_Write/LoadVal
52oct 06 10:19:27 <roberpot> and then modify the r_WriteVal, r_LoadVal and r_Write ?
53oct 06 10:19:42 <XuN__> then ...
54oct 06 10:19:52 <XuN__> there is a enum per each class
55oct 06 10:19:57 <roberpot> ahm
56oct 06 10:20:50 * drkkkkk (~ope84@host147-84-dynamic.60-82-r.retail.telecomitalia.it) ha entrado en #sphereserver
57oct 06 10:21:03 <XuN__> in some cases its being read directly from that file
58oct 06 10:21:07 <XuN__> if you open CChar.cpp
59oct 06 10:21:14 <XuN__> line 1729
60oct 06 10:21:19 <ThatSide> what was the tag or attr that makes an item visible only to one player?
61oct 06 10:21:29 <XuN__> enum CHC_TYPE
62oct 06 10:21:29 <XuN__> {
63oct 06 10:21:30 <XuN__> #define ADD(a,b) CHC_##a,
64oct 06 10:21:30 <XuN__> #include "../tables/CChar_props.tbl"
65oct 06 10:21:30 <XuN__> #undef ADD
66oct 06 10:21:30 <XuN__> CHC_QTY
67oct 06 10:21:32 <XuN__> };
68oct 06 10:21:34 <XuN__> LPCTSTR const CChar::sm_szLoadKeys[CHC_QTY+1] =
69oct 06 10:21:36 <XuN__> {
70oct 06 10:21:38 <XuN__> #define ADD(a,b) b,
71oct 06 10:21:40 <XuN__> #include "../tables/CChar_props.tbl"
72oct 06 10:21:42 <XuN__> #undef ADD
73oct 06 10:21:44 <XuN__> NULL
74oct 06 10:21:46 <XuN__> };
75oct 06 10:21:50 <XuN__> it automatically reads that table
76oct 06 10:21:52 <XuN__> but if you open CItemSp.cpp (the one for spawns and some other items)
77oct 06 10:22:10 <roberpot> ok
78oct 06 10:22:11 <XuN__> at 420 you'll see a custom enum for this class
79oct 06 10:22:37 <XuN__> tbh it should be a more clear way for this IMO because in some places there is a file and in some places code is 'there'
80oct 06 10:23:22 <roberpot> so enums are autogen?
81oct 06 10:24:04 <XuN__> for big classes, yes, like for CChar
82oct 06 10:24:07 <roberpot> ok
83oct 06 10:24:09 <roberpot> nice nice
84oct 06 10:24:19 <XuN__> but CItemSpawn only has a few entries, so I created it in there
85oct 06 10:24:28 <XuN__> enum ISPW_TYPE
86oct 06 10:24:28 <XuN__> {
87oct 06 10:24:28 <XuN__> ISPW_ADDOBJ,
88oct 06 10:24:28 <XuN__> ISPW_AT,
89oct 06 10:24:28 <XuN__> ISPW_COUNT,
90oct 06 10:24:29 <XuN__> ISPW_DELOBJ,
91oct 06 10:24:31 <XuN__> ISPW_RESET,
92oct 06 10:24:33 <XuN__> ISPW_START,
93oct 06 10:24:35 <XuN__> ISPW_STOP,
94oct 06 10:24:37 <XuN__> ISPW_QTY
95oct 06 10:24:39 <XuN__> };
96oct 06 10:24:55 <XuN__> here you have the enum itself... under it there is a list of LPCTSTR holding the 'string' value which should be read from script
97oct 06 10:24:59 <XuN__> LPCTSTR const CItemSpawn::sm_szLoadKeys[ISPW_QTY + 1] =
98oct 06 10:24:59 <XuN__> {
99oct 06 10:24:59 <XuN__> "ADDOBJ",
100oct 06 10:24:59 <XuN__> "AT",
101oct 06 10:24:59 <XuN__> "COUNT",
102oct 06 10:25:00 <XuN__> "DELOBJ",
103oct 06 10:25:02 <XuN__> "RESET",
104oct 06 10:25:04 <XuN__> "START",
105oct 06 10:25:06 <XuN__> "STOP",
106oct 06 10:25:08 <XuN__> NULL
107oct 06 10:25:10 <XuN__> };
108oct 06 10:25:29 <XuN__> as you can see we have to do double work, one for the source and one for the scripts
109oct 06 10:25:36 <XuN__> ThatSide, i'm checking ... can't remember now XD
110oct 06 10:25:42 <roberpot> ok
111oct 06 10:26:52 <XuN__> SeenBy_0%lx
112oct 06 10:27:02 <XuN__> tag.SeenBy_<src>
113oct 06 10:27:04 <XuN__> for example
114oct 06 10:27:41 <ThatSide> ok nice
115oct 06 10:27:43 <ThatSide> ty
116oct 06 10:27:46 <XuN__> btw, what formatting are you applying roberpot ?
117oct 06 10:27:56 <XuN__> nvm
118oct 06 10:27:57 <drkkkkk> https://www.youtube.com/watch?v=xgHMD_LxifI
119oct 06 10:28:10 <XuN__> when you commit to your fork just tell me so I see your changes
120oct 06 10:28:15 <roberpot> well now i have the code compiling on linux and windows and i can start with doxygen on my pcs :-)
121oct 06 10:28:20 <roberpot> oc
122oct 06 10:28:32 <roberpot> i'll ask you before try to create a pull request
123oct 06 10:28:33 <roberpot> ok?
124oct 06 10:28:35 <XuN__> LOL
125oct 06 10:28:39 <XuN__> ok
126oct 06 10:28:40 <XuN__> question
127oct 06 10:28:46 <XuN__> can you see other's people forks?
128oct 06 10:28:50 <roberpot> y
129oct 06 10:28:53 <XuN__> kk
130oct 06 10:29:01 <roberpot> click on number, not on fork :P
131oct 06 10:29:29 <XuN__> my doubt was if anyone could see them
132oct 06 10:29:38 <XuN__> not only privileged users
133oct 06 10:29:57 <roberpot> mmm
134oct 06 10:30:36 <roberpot> i think no :S
135oct 06 10:31:05 <XuN__> https://github.com/Sphereserver/Source/network/members
136oct 06 10:31:26 <roberpot> ooh perfect
137oct 06 10:31:34 <roberpot> i see saw on network
138oct 06 10:31:39 <roberpot> * i saw xD
139oct 06 10:31:49 <XuN__> so you see other members in that list
140oct 06 10:31:50 <XuN__> right?
141oct 06 10:32:10 * azmanomer (58f931a5@gateway/web/freenode/ip.88.249.49.165) ha entrado en #sphereserver
142oct 06 10:32:13 <roberpot> y
143oct 06 10:32:21 <XuN__> cool
144oct 06 10:32:34 <drkkkkk> that was carujo making a fix
145oct 06 10:32:55 <XuN__> so drkkkkk ...
146oct 06 10:33:04 <XuN__> you never scripted, what will your excuse be now....
147oct 06 10:33:07 <XuN__> learning the source?
148oct 06 10:33:24 <drkkkkk> nono
149oct 06 10:33:37 <drkkkkk> they actually make me work at work
150oct 06 10:33:43 <drkkkkk> how they dare
151oct 06 10:35:58 <XuN__> lol
152oct 06 10:35:59 <XuN__> bastards
153oct 06 10:36:07 <XuN__> why the hell hire you if they plan to make you work?
154oct 06 10:36:17 <XuN__> ffs, this is how the world is coming to its end
155oct 06 10:38:03 <roberpot> xddd
156oct 06 10:38:16 <drkkkkk> lol
157oct 06 10:47:18 <XuN__> http://i.imgur.com/yCqHVP1.gif
158oct 06 10:48:59 <XuN__> i have to talk you about triggers too
159oct 06 10:49:03 <XuN__> and ini's settings
160oct 06 10:49:50 <XuN__> those 3 'lessons' are the basics to work with sphere
161oct 06 10:50:40 <ThatSide> XuN_ how does that seenby work? do I have to add attr_invis ?
162oct 06 10:51:02 <XuN__> yes, it is a must
163oct 06 10:51:18 <XuN__> no one will see it excepting the characters with a tag like this set on the item
164oct 06 10:52:11 <ThatSide> ok ill try
165oct 06 10:58:55 <ThatSide> nice. only thing i set attr_invis normal player cannot pick it up
166oct 06 11:07:38 <ThatSide> XuN_ one more thing I am using that script that disables UO character creation. Everything works perfect until new character dies. Somehow I Cant change 0body and 0color
167oct 06 11:08:59 <roberpot> XuN__, later can we continue with lesson 2 ? XD
168oct 06 11:14:59 <XuN__> 0body= its not zero, its O
169oct 06 11:15:02 <XuN__> Obody
170oct 06 11:15:11 <XuN__> yes roberpot, when you want
171oct 06 11:24:45 <ThatSide> XuN_ http://prntscr.com/8oajsr
172oct 06 11:25:50 <ThatSide> with this infor I can change it but with my character creation script it dont change to c_man or c_woman.. If I create a woman character after death it becomes a man with white skin color (as the c_newplayer is set)
173oct 06 11:31:59 <roberpot> XuN__, why CAccount destructor is virtual if there is not child classes ? :S
174oct 06 11:40:54 <ThatSide> oh, nvm XuN_ I finally understood what u said :D
175oct 06 11:42:42 <azmanomer> roperpot could you keep those lessons? to share with me :D
176oct 06 11:43:02 <roberpot> oc i'll copy all the chat and can include on wiki
177oct 06 11:43:07 <roberpot> for future reference :P
178oct 06 11:43:09 <azmanomer> :D
179oct 06 11:43:11 <azmanomer> thx
180
181
182
183oct 08 09:51:30 <roberpot> XuN_, time to lesson 2 ?
184oct 08 10:13:17 <XuN_> hm
185oct 08 10:13:28 <XuN_> what do you want to know for lesson 2
186oct 08 10:13:36 <XuN_> triggers? ini's settings? other classes?
187oct 08 10:13:57 <XuN_> I think i'll explain triggers
188oct 08 10:14:39 <XuN_> 1st: triggers are only fired if they are being used by any object
189oct 08 10:15:22 <XuN_> if ( IsTrigUsed(TRIGGER_SKILLSTART) ) will only fire if you have at least one @SkillStart in your scripts
190oct 08 10:16:23 <XuN_> if it's found, then this check will be true even if the current item/char/region .. doesnt have it in a event (so it's more a 'don't bother with unused triggers' check than a 'should I fire this trigger right now?')
191oct 08 10:16:57 <XuN_> to do so there's a triggers.tbl
192oct 08 10:17:20 * azmanomer (58f931a5@gateway/web/freenode/ip.88.249.49.165) ha entrado en #sphereserver
193oct 08 10:17:45 <XuN_> so this file has all the existing triggers (in alphabetical order too, almost all the .tbl files must follow this rule)
194oct 08 10:19:30 <XuN_> and all keys inside will be converted to TRIGGER_'KEY' automatically, as you can see inside you only have keys like 'JAIL', 'CREATE' and so, but they will be stored as TRIGGER_JAIL, TRIGGER_CREATE and so
195oct 08 10:19:42 <XuN_> this is part of the first step
196oct 08 10:20:54 <XuN_> CObjBase has a virtual OnTrigger function which can make triggers work in any children class
197oct 08 10:21:18 <XuN_> however we mostly use them in CItem and CChar, and both classes has one override for the main funct
198oct 08 10:21:39 <XuN_> i'll create an example with CChar class
199oct 08 10:22:02 <XuN_> TRIGRET_TYPE OnTrigger( CTRIG_TYPE trigger, CTextConsole * pSrc, CScriptTriggerArgs * pArgs = NULL )
200oct 08 10:22:26 <XuN_> as you can see there's an enum called CTRIG_TYPE
201oct 08 10:22:39 <XuN_> following it's declaration you reach CObjBase.h
202oct 08 10:23:35 <XuN_> alphabetical order must be followed here too, because this is how the 3 phases of the trigger gets connected (phase 3 will be explained later)
203oct 08 10:24:11 <XuN_> CTRIG_Key must be added here
204oct 08 10:24:16 <XuN_> so the trigger for characters is already created
205oct 08 10:24:58 <XuN_> however, as I explained before, scriptside force us to do double work... this enum will be used by the source to handle the trigger ... but we need something to know that scripts are calling this trigger
206oct 08 10:25:15 <XuN_> and now is when phase 3 appears
207oct 08 10:25:49 <XuN_> following static LPCTSTR const sm_szTrigName[CTRIG_QTY+1]; in CChar's class declaration
208oct 08 10:26:07 <XuN_> you'll see a list of strings, used as script declarations for the triggers
209oct 08 10:26:50 <XuN_> source automatically use enums to find the required entry of the LPCTSTR list
210oct 08 10:27:16 <XuN_> so entry num 20 in CTRIG_TYPE must be the very same trigger as entry 20 in this sm_szTrigName enum
211oct 08 10:27:26 <XuN_> or other trigger will be readed (very bad thing)
212oct 08 10:27:57 <XuN_> you don't want @Hit being called instead of @GetHit
213oct 08 10:28:44 <XuN_> so, you have now created both source access and script access: CTRIG_SomeThing and "@SomeThing"
214oct 08 10:29:01 <XuN_> you now only need to find the part of the code you want the @SimeThing trigger to work
215oct 08 10:29:33 <XuN_> so right now you have a working trigger with some piece of code like this:
216oct 08 10:29:42 <XuN_> if ( IsTrigUsed( TRIGGER_SOMETHING ) )
217oct 08 10:29:43 <XuN_> {
218oct 08 10:30:02 <XuN_> OnTrigger( CTRIG_SOMETHING, this, NULL );
219oct 08 10:30:03 <XuN_> }
220oct 08 10:30:21 <XuN_> this will call @Something in characters, since we are working on CChar
221oct 08 10:30:42 <XuN_> but this might not be enough, we want some kind of control over it, like returns and args
222oct 08 10:31:04 <XuN_> args is handled by CSCriptTriggerArgs class
223oct 08 10:32:08 <XuN_> i'll paste here the first trigger I found
224oct 08 10:32:10 <XuN_> if ( IsTrigUsed(TRIGGER_RENAME) )
225oct 08 10:32:10 <XuN_> {
226oct 08 10:32:10 <XuN_> CScriptTriggerArgs args;
227oct 08 10:32:10 <XuN_> args.m_s1 = s.GetArgStr();
228oct 08 10:32:10 <XuN_> args.m_pO1 = this;
229oct 08 10:32:12 <XuN_> if ( this->OnTrigger(CTRIG_Rename, this, &args) == TRIGRET_RET_TRUE )
230oct 08 10:32:16 <XuN_> return( false );
231oct 08 10:32:18 <XuN_> SetName( args.m_s1 );
232oct 08 10:32:20 <XuN_> }
233oct 08 10:32:38 <XuN_> args is nto declared as a pointer, it's just storing data
234oct 08 10:32:43 <XuN_> so we create an args definition
235oct 08 10:33:02 <XuN_> CScriptTriggerArgs Test;
236oct 08 10:33:10 <XuN_> Test will be our 'args' now
237oct 08 10:33:31 <XuN_> Test.m_s1 = "whatever";
238oct 08 10:34:08 <XuN_> m_s1 is used to store ARGS or ARGS1 (it's more like a part of args, than the whole args, but we don't need to have something bigger right now)
239oct 08 10:34:20 <XuN_> so we gave m_s1 a string
240oct 08 10:34:31 <XuN_> in the trigger you can do something like
241oct 08 10:34:34 <XuN_> ON=@Something
242oct 08 10:34:41 <XuN_> say args=<args>
243oct 08 10:34:50 <XuN_> and you'll say args=whatever
244oct 08 10:35:04 <XuN_> there are more type of args
245oct 08 10:35:17 <XuN_> m_iN1 is argn1
246oct 08 10:35:22 <XuN_> m_iN2 is argn2...
247oct 08 10:35:37 <XuN_> m_pO1 is argo
248oct 08 10:35:47 * drkkkkk (~ope84@host147-84-dynamic.60-82-r.retail.telecomitalia.it) ha entrado en #sphereserver
249oct 08 10:35:48 <XuN_> etc
250oct 08 10:35:58 <XuN_> right now we have enough data to handle this trigger
251oct 08 10:36:18 <XuN_> if you read the OnTrigger declaration you'll notice that args are
252oct 08 10:36:47 <XuN_> CTRIG_TYPE (the trigger itself), CTextConsole ( who should be SRC here ), CScriptTriggerArgs* (the args)
253oct 08 10:37:04 <XuN_> so we now have different data to send than in the first example I wrote
254oct 08 10:37:23 <XuN_> OnTrigger( CTRIG_SOMETHING, this, &Test );
255oct 08 10:37:47 <XuN_> this will pass Test as args, while allowing data to be modified in the proccess in the very same field
256oct 08 10:38:31 <XuN_> so if args changed in the trigger it will be reflected in Test.m_s1
257oct 08 10:39:30 <XuN_> so I think it's clear enough how to create args for triggers
258oct 08 10:39:55 <XuN_> now, returns
259oct 08 10:40:56 <XuN_> while the trigger is being read, there are some restricted keywords which manages the behaviour of the code
260oct 08 10:41:18 <XuN_> if, elseif, endif, return '', break, continue ...
261oct 08 10:41:32 <XuN_> to be more precise:
262oct 08 10:41:32 <XuN_> enum TRIGRET_TYPE // trigger script returns.
263oct 08 10:41:33 <XuN_> {
264oct 08 10:41:33 <XuN_> TRIGRET_RET_FALSE = 0, // default return. (script might not have been handled)
265oct 08 10:41:33 <XuN_> TRIGRET_RET_TRUE = 1,
266oct 08 10:41:33 <XuN_> TRIGRET_RET_DEFAULT, // we just came to the end of the script.
267oct 08 10:41:35 <XuN_> TRIGRET_ENDIF,
268oct 08 10:41:37 <XuN_> TRIGRET_ELSE,
269oct 08 10:41:39 <XuN_> TRIGRET_ELSEIF,
270oct 08 10:41:41 <XuN_> TRIGRET_RET_HALFBAKED,
271oct 08 10:41:43 <XuN_> TRIGRET_BREAK,
272oct 08 10:41:45 <XuN_> TRIGRET_CONTINUE,
273oct 08 10:41:48 <XuN_> TRIGRET_QTY
274oct 08 10:41:50 <XuN_> };
275oct 08 10:42:11 <XuN_> end of code is converted to TRIGRET_RET_DEFAULT ( 2 ), so if no return is used this will be default return
276oct 08 10:42:17 <XuN_> return 0 = 0
277oct 08 10:42:21 <XuN_> return 1 = 1
278oct 08 10:42:27 <XuN_> break = 7 ...
279oct 08 10:43:31 <XuN_> according to this we only have available return 0 and return 1 in scripts to be checked, so if you want more returns you'll have to 'static_cast<TRIGRET_TYPE>(11)' for example
280oct 08 10:43:45 <XuN_> coming back to topic ...
281oct 08 10:44:05 <XuN_> TRIGRET_TYPE iRet = OnTrigger( CTRIG_SOMETHING, this, &Test );
282oct 08 10:44:37 <XuN_> if ( iRet == TRIGRET_RET_TRUE ) // return 1
283oct 08 10:44:50 <XuN_> {
284oct 08 10:44:56 <XuN_> some code here
285oct 08 10:44:59 <XuN_> other code here
286oct 08 10:45:25 <XuN_> return; // script sent a return 1, we do whatever we want (if we have to) and then stop our default actions.
287oct 08 10:45:25 <XuN_> }
288oct 08 10:46:18 <XuN_> else if ( iRet == TRIGRET_RET_DEFAULT || iRet == TRIGRET_RET_FALSE )// it's not really needed since the return 1 is the return we are using to stop everything, but for the example ... here we go
289oct 08 10:47:03 <XuN_> SysMessage("You have just 'Something'ed', be happy\n");
290oct 08 10:48:24 * ThatSide (5616ac18@gateway/web/freenode/ip.86.22.172.24) ha entrado en #sphereserver
291oct 08 10:49:03 <XuN_> now ... extra stuff
292oct 08 10:49:17 <XuN_> there's some default code in the OnTrigger() for both items and chars
293oct 08 10:49:43 <XuN_> if you create an additional trigger in triggers.tbl
294oct 08 10:49:58 <XuN_> prefixed by 'char' you'll have something like
295oct 08 10:50:01 <XuN_> @charSomething
296oct 08 10:50:18 <XuN_> ie: we had already ADD(SOMETHING) added to triggers.tbl
297oct 08 10:50:33 <XuN_> now we create ADD(CHARSOMETHING)
298oct 08 10:51:03 <XuN_> each time OnTrigger( CTRIG_WHATEVERYOUWRITE, src, args);
299oct 08 10:51:11 <XuN_> it will automatically search for
300oct 08 10:51:16 <XuN_> char%s
301oct 08 10:51:30 <XuN_> if there is a src different than you
302oct 08 10:52:11 <XuN_> wait, wrote it wrong, the trigger must not be added to triggers.tbl
303oct 08 10:52:19 <XuN_> but on char's triggers, on both enums
304oct 08 10:52:24 <XuN_> CTRIG_charSomething
305oct 08 10:52:29 <XuN_> and "@charSomething"
306oct 08 10:52:54 <XuN_> know the way, know they exists, but never added one xD
307oct 08 10:53:58 <XuN_> and I might be wrong again
308oct 08 10:54:10 <XuN_> let me check the full proccess before writing another lie
309oct 08 10:55:33 <XuN_> ok
310oct 08 10:55:51 <XuN_> @Attack is called on me, who is attacking
311oct 08 10:56:02 <XuN_> @charAttack will be called on src, who I'm attacking
312oct 08 10:56:50 <XuN_> both @charAttack and CTRIG_ATTACK must be added on chars
313oct 08 10:56:52 <XuN_> ALSO
314oct 08 10:57:00 <XuN_> there's another bonus here
315oct 08 10:57:06 <XuN_> for items it can happen too
316oct 08 10:57:18 <XuN_> CTRIG_itemAfterClick,
317oct 08 10:57:18 <XuN_> CTRIG_itemBuy,
318oct 08 10:57:18 <XuN_> CTRIG_itemClick, // I clicked on an item
319oct 08 10:57:18 <XuN_> CTRIG_itemClientTooltip,
320oct 08 10:57:18 <XuN_> CTRIG_itemContextMenuRequest,
321oct 08 10:57:21 <XuN_> CTRIG_itemContextMenuSelect,
322oct 08 10:57:23 <XuN_> CTRIG_itemCreate, //?
323oct 08 10:57:25 <XuN_> CTRIG_itemDamage, //?
324oct 08 10:57:40 <XuN_> etc etc etc, each time @Buy is being fired to an item, itembuy is firing for the character calling @buy in it
325oct 08 10:58:20 <XuN_> so both CItem and CChar can generate an additional trigger on CChar prefixed by 'item' or 'char' depending on the calling class
326oct 08 10:58:46 <XuN_> I'm not sure if I explained this as clear as I wanted
327oct 08 11:00:03 <XuN_> http://pastebin.com/mxMZy57i
328oct 08 11:00:14 <XuN_> the whole text is there
329oct 08 11:12:10 <drkkkkk> bloooeurp
330oct 08 11:15:46 <roberpot> thx XuN_ , i copied the irc log i'm going to read it carefully :-)
331oct 08 11:15:49 <roberpot> really thx :-)
332oct 08 11:16:17 <roberpot> i have a question about general source code layout
333oct 08 11:16:29 <roberpot> i can see, for example, CAccount class
334oct 08 11:16:43 <roberpot> there is a lot of sections private public protected private public... etc
335oct 08 11:17:06 <roberpot> this layout attends to any type of organization or simple its patch hover patch result?
336oct 08 11:18:03 <roberpot> is there any problem if i reorder that class to improve the doc?
337oct 08 11:18:22 <roberpot> or is better to not touch it and only add doc strings?
338oct 08 11:29:10 <XuN_> I never understood this either
339oct 08 11:29:20 <XuN_> as far as I know the order is not important
340oct 08 11:30:12 <XuN_> although in some classes it seems to be a reason for this (like having #regions) it's not something that cannot be done using a simple comment above that declarations
341oct 08 11:33:43 <roberpot> nice the explain about triggers XuN_
342oct 08 11:33:48 <roberpot> it's so complex
343oct 08 11:33:54 <roberpot> i will need time to asimilate all XD
344oct 08 11:33:56 <roberpot> but nice
345oct 08 11:34:20 <roberpot> i copied and, on a near future, i'll make a doc about that for wiki
346oct 08 11:34:43 <roberpot> i'll ask you to take a look at the doc to verify
347oct 08 11:34:44 <roberpot> :P
348oct 08 11:34:58 <XuN_> ty
349oct 08 11:45:56 <ThatSide> when I put my character in to 'sleep' is anyone allowed to loot me ?
350oct 08 11:51:24 <ThatSide> damn they are :D
351oct 08 14:14:25 * criminalX (~crminalX@199.Red-88-1-229.dynamicIP.rima-tde.net) ha entrado en #sphereserver
352oct 08 14:16:33 <roberpot> XuN_, in CAccount class there is two attrs called m_TagDefs and m_BaseDefs
353oct 08 14:16:46 <roberpot> m_TagDefs is for tags and m_BaseDefs is for regular attrs?
354oct 08 14:16:58 <roberpot> a CAccount can have tags?
355oct 08 14:28:50 * drkkkkk se ha marchado (Read error: Connection reset by peer)
356oct 08 14:32:56 <XuN_> sure, account can have tags
357oct 08 14:33:33 <XuN_> and m_BaseDefs are for new properties
358oct 08 14:33:56 <XuN_> accounts doesnt have one, but it's still added there in case they are implemented for them
359oct 08 14:35:24 * criminalX se ha marchado (Ping timeout: 252 seconds)
360oct 08 14:39:18 * criminalX (~crminalX@199.Red-88-1-229.dynamicIP.rima-tde.net) ha entrado en #sphereserver
361oct 08 14:45:23 <roberpot> nice