Welcome to the Builder Academy

Question Question.

More
14 Nov 2012 23:38 #1056 by zusuk
Replied by zusuk on topic Re: Question.
Yeah I guess I just don't understand... Sorry I couldn't help you!

Website
www.luminariMUD.com

Main Game Port
luminariMUD.com:4100

Please Log in or Create an account to join the conversation.

More
17 Nov 2012 04:25 #1066 by Vatiken
Replied by Vatiken on topic Re: Question.
Code:
case 'B': if (b >= MAX_SOCKET_AFFECT) { log("SYSERR: Too many B fields (%d max), %s", MAX_SOCKET_AFFECT, buf2); exit(1); } if (!get_line(obj_f, line)) { log("SYSERR: Format error in 'B' field, %s\n" "...expecting 2 numeric constants but file ended!", buf2); exit(1); } if ((retval = sscanf(line, " %d %d ", t, t + 1)) != 2) { log("SYSERR: Format error in 'B' field, %s\n"
What is the switch() for this case?
Where is "b" being set?
What is supposed to be getting accomplished here?

tbaMUD developer/programmer

Please Log in or Create an account to join the conversation.

More
17 Nov 2012 04:54 #1067 by Liko
Replied by Liko on topic Re: Question.

Vatiken wrote: What is the switch() for this case?
Where is "b" being set?
What is supposed to be getting accomplished here?


1) the switch is
Code:
switch (*line) {

in parse_object in db.c where it calls for E, A, T, S, and # also.

2. It's being set in oedit.c where it's setting the bonuses for the modifier item type. It saves it in genobj.c
Code:
for (counter3 = 0; counter3 < MAX_SOCKET_AFFECT; counter3++) if(obj->bonus[counter3].modifier) fprintf(fp, "B\n" "%d %d\n", obj->bonus[counter3].location, obj->bonus[counter3].modifier);

3. What this does is setting the modifier bonuses that will be applied to the weapon or armor you want to socket. IE if you have MAX HIT + 5 Modifier the bonuses on it would be MAXHIT + 5. That maxhit+5 would transfer its bonuses over to the item.

Randian(0.0.0)
Owner/Developer

Please Log in or Create an account to join the conversation.

Time to create page: 0.209 seconds