Sphereserver / Source

http://spherecommunity.net
Apache License 2.0
107 stars 58 forks source link

29-04-2016, Coruja Fixed: Invisible (statf_invisible) chars not being revealed when others chars walk over him. #65

Open azmanomer opened 8 years ago

azmanomer commented 8 years ago

Can you make this optinal so we can change it? https://github.com/Sphereserver/Source/commit/0a1d3cd61db9d83092b457ae1fd78947a5c08583

azmanomer commented 8 years ago

else if ( pChar->IsStatFlag(STATF_Hidden) ) { sprintf(pszMsg, g_Cfg.GetDefaultMsg(DEFMSG_HIDING_STUMBLE), pChar->GetName()); pChar->Reveal(STATF_Hidden); } else if ( pChar->IsStatFlag(STATF_Invisible) && !(g_Cfg.m_iRevealFlags & REVEALF_ONSTEP) ) { sprintf(pszMsg, g_Cfg.GetDefaultMsg(DEFMSG_HIDING_STUMBLE), pChar->GetName()); pChar->Reveal(STATF_Invisible); }

idk is it correct but this can help i guess and adding REVEALF_ONSTEP setting to sphere.ini

coruja747 commented 8 years ago

I dont know if I undertood correctly, but you're suggesting an new flag to add on RevealFlags .ini setting?

azmanomer commented 8 years ago

yep.

coruja747 commented 8 years ago

that's easy to do, but honestly I think that RevealFlag is a bit non-standard, because some reveal flags reveal both statf_hidden + statf_invisible, some flags will reveal only statf_hidden, and some flags won't reveal at all

so to prevent it keep growing with more flags acting different from each other, maybe it's a good idea replace RevealFlags with another setting more customizable, like split all these flags into individual settings, allowing the user select the flags to be revealed on each action

eg:

RevealWhenLooting = statf_hidden
RevealWhenCastSpells = statf_hidden|statf_invisible
RevealWhenWalkThrough = statf_invisible
RevealWhenSpeak = (empty) // <-- don't reveal
azmanomer commented 8 years ago

y i aggre with this it ll be better as u say :) but i dont think there will be more flags about invisibility.