Welcome to the Builder Academy

Question 2 bugs

More
21 May 2016 17:38 - 21 May 2016 17:40 #5915 by JTP
2 bugs was created by JTP
Hey
Code:
First of all: So two mobs in the same room..I cast blind on both..Attack one, but the other helps anyway ?? Can this be fixed ?? Also tested online at tbamud, same problem. mobact.c /* Helper Mobs */ if (MOB_FLAGGED(ch, MOB_HELPER) && (!AFF_FLAGGED(ch, AFF_BLIND) || !AFF_FLAGGED(ch, AFF_CHARM))) { found = FALSE; for (vict = world[IN_ROOM(ch)].people; vict && !found; vict = vict->next_in_room) { if (ch == vict || !IS_NPC(vict) || !FIGHTING(vict)) continue; if (GROUP(vict) && GROUP(vict) == GROUP(ch)) continue; if (IS_NPC(FIGHTING(vict)) || ch == FIGHTING(vict)) continue; act("$n jumps to the aid of $N!", FALSE, ch, 0, vict, TO_ROOM); hit(ch, FIGHTING(vict), TYPE_UNDEFINED); found = TRUE; } } ------------ Ok i cast identify on an item, cost no mana..I see two spello for identify in spell_parser.c Why are there two, they obviously dont work as they should, when i can cast identfify for free ?? 933 spello(SPELL_IDENTIFY, "identify", 50, 25, 5, POS_STANDING, 934 TAR_CHAR_ROOM | TAR_OBJ_INV | TAR_OBJ_ROOM, FALSE, MAG_MANUAL, 935 NULL); 936 937 938 /* NON-castable spells should appear below here. */ 939 spello(SPELL_IDENTIFY, "identify", 0, 0, 0, 0, 940 TAR_CHAR_ROOM | TAR_OBJ_INV | TAR_OBJ_ROOM, FALSE, MAG_MANUAL, 941 NULL);
Last edit: 21 May 2016 17:40 by JTP.

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

More
21 May 2016 18:57 #5918 by thomas
Replied by thomas on topic 2 bugs

JTP wrote: Hey

First of all: So two mobs in the same room..I cast blind on both..Attack one, but the other helps anyway ??
Can this be fixed ?? Also tested online at tbamud, same problem.
mobact.c

Code:
/* Helper Mobs */ if (MOB_FLAGGED(ch, MOB_HELPER) && (!AFF_FLAGGED(ch, AFF_BLIND) || !AFF_FLAGGED(ch, AFF_CHARM)))

I think the problem is here. This line should be
Code:
/* Helper Mobs */ if (MOB_FLAGGED(ch, MOB_HELPER) && !AFF_FLAGGED(ch, AFF_BLIND) && !AFF_FLAGGED(ch, AFF_CHARM))

JTP wrote: Ok i cast identify on an item, cost no mana..I see two spello for identify in spell_parser.c

Why are there two, they obviously dont work as they should, when i can cast identfify for free ??

Code:
933 spello(SPELL_IDENTIFY, "identify", 50, 25, 5, POS_STANDING, 934 TAR_CHAR_ROOM | TAR_OBJ_INV | TAR_OBJ_ROOM, FALSE, MAG_MANUAL, 935 NULL); 936 937 938 /* NON-castable spells should appear below here. */ 939 spello(SPELL_IDENTIFY, "identify", 0, 0, 0, 0, 940 TAR_CHAR_ROOM | TAR_OBJ_INV | TAR_OBJ_ROOM, FALSE, MAG_MANUAL, 941 NULL);

This looks like an oversight - when the spell was made an active spell in december 2009, the old definition was left in ( github.com/tbamud/tbamud/commit/2b74ef23...1ce31c996df037094ef2 ). Solution: remove the second definition.

Thanks for those bug reports.

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

More
21 May 2016 19:01 #5919 by JTP
Replied by JTP on topic 2 bugs
My pleasure..

aggro mobs
/* Aggressive Mobs */
if (!MOB_FLAGGED(ch, MOB_HELPER) && (!AFF_FLAGGED(ch, AFF_BLIND) || !AFF_FLAGGED(ch, AFF_CHARM))) {

Is this one then also wrong ?

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

More
21 May 2016 20:22 #5920 by thomas
Replied by thomas on topic 2 bugs
yes, same thing as above.

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

More
21 May 2016 20:29 #5921 by JTP
Replied by JTP on topic 2 bugs
Cool thanks, and i almost just got home, and tested the helper part. It Works great thanks thomas.

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

Time to create page: 0.332 seconds