Forum breadcrumbs - Sei qui:ForumNebbie Arcane: BugsDarkness
per creare messaggi e topic.

Darkness

Se editate l'affect "Darkness" sappiate che non funziona con gli oggetti anti sun.

I miei occhiali:

L'oggetto e': MAGIC ARTIFACT
Peso: 2, Valore: 20001, Costo di rent: 0 [RARO]
Ti puo' dare:
Ti puo' dare : WIS by 1
Ti puo' dare : MANA by 5
Ti puo' dare : SPELL AFFECT by DARKNESS

La parte di codice dove è evidente che in caso di luce non sei protetto dall'affected_by Darkness ma solo dallo spell (file spec_procs3.cpp):

OBJSPECIAL_FUNC(AntiSunItem) {

if(type != EVENT_COMMAND) {

returnFALSE;

}

if(OUTSIDE(ch) && weather_info.sunlight == SUN_LIGHT &&

weather_info.sky<= SKY_CLOUDY &&

!affected_by_spell(ch, SPELL_GLOBE_DARKNESS)) {

/* frag the item! */

act("The sun strikes $p, causing it to fall appart!", FALSE, ch, obj,

NULL, TO_CHAR);

act("The sun strikes $p worn by $n, causing it to fall appart!", FALSE,

ch, obj, NULL, TO_ROOM);

MakeScrap(ch, 0, obj);

returnTRUE; /* if not TRUE mud will CRASH! */

}

returnFALSE;

}

 

Se dovessi intervenire io credo che basterebbe cambiare la parte:

if(OUTSIDE(ch) && weather_info.sunlight == SUN_LIGHT &&

weather_info.sky<= SKY_CLOUDY &&

!affected_by_spell(ch, SPELL_GLOBE_DARKNESS))

con

if(OUTSIDE(ch) && weather_info.sunlight == SUN_LIGHT &&

weather_info.sky<= SKY_CLOUDY &&

( !affected_by_spell(ch, SPELL_GLOBE_DARKNESS) ||

!IS_SET(ch->specials.affected_by, AFF_GLOBE_DARKNESS) ) )