Welcome to the Builder Academy

Question Fireshield crash

More
02 Nov 2016 21:59 - 02 Nov 2016 22:03 #6244 by JTP
Replied by JTP on topic Fireshield crash
Code:
+ if (AFF_FLAGGED(victim, AFF_FIRESHIELD) && !AFF_FLAGGED(ch, AFF_FIRESHIELD) && GET_POS(victim) != POS_MORTALLYW) {
Doesnt that mean victim has fireshield on, but "!AFF" char does not have fireshield on ?


What i need is does either char or victim have fireshield on, fight will begin and one gets damage from fireshield.

If both has fireshield on, fight should still occur, but neither takes damage from the fireshield.
Last edit: 02 Nov 2016 22:03 by JTP.

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

More
02 Nov 2016 22:07 #6245 by thomas
Replied by thomas on topic Fireshield crash
indeed, this will do that. But the real fix, I think is to damage by 0 when there's a fireshield on both chars.

So, replace the
Code:
return 0;
in your code with
Code:
damage(victim, ch, 0, SPELL_FIRESHIELD);
That should do it.

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

More
02 Nov 2016 22:08 - 02 Nov 2016 22:43 #6246 by JTP
Replied by JTP on topic Fireshield crash
if (AFF_FLAGGED(ch, AFF_FIRESHIELD) && AFF_FLAGGED(victim, AFF_FIRESHIELD))
return 0;
else if (AFF_FLAGGED(victim, AFF_FIRESHIELD) && GET_POS(victim) != POS_MORTALLYW) {


This Works for other players though:
Code:
Testchar is burned when he hits Elminster Aumar. Testchar hits Elminster Aumar extremely hard. Testchar is burned when he hits Elminster Aumar. Testchar hits Elminster Aumar extremely hard. You parry Elminster Aumar's vicious attack! Your fireshield has no effect agenst Elminster Aumar's fireshield. Your fireshield has no effect agenst Elminster Aumar's fireshield.



Or no the victim dont hit back.
Last edit: 02 Nov 2016 22:43 by JTP.

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

More
02 Nov 2016 22:10 - 02 Nov 2016 22:10 #6247 by JTP
Replied by JTP on topic Fireshield crash
damage(victim, ch, 0, SPELL_FIRESHIELD);

That crashed the mud
Last edit: 02 Nov 2016 22:10 by JTP.

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

More
02 Nov 2016 22:54 - 02 Nov 2016 22:55 #6248 by JTP
Replied by JTP on topic Fireshield crash
Ok the !AFF worked :)

Tank with fireshield didnt get any messages about hitting fireshield, but others in Group that didnt have fireshield on, got hit with fireshield messages when attacking victim.

Thanks alot Thomas
Last edit: 02 Nov 2016 22:55 by JTP.

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

Time to create page: 0.208 seconds