-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Description
When using an item with morex, even nonmagical type like bellow, it crashes the sphere, because it wants to cast a spell (from morex) without setting the caster.
Following item:
[ITEMDEF i_wand_of_jail]
id=0df2
name=GM's Wand of Jail
type=t_weapon_mace_sharp
on=@create
attr=attr_newbie
hitpoints=100
on=@dclick
morex=<src.account.plevel>
serv.log plevel: <morex>
if (<morex> < 2)
src.sysmessage You Wouldn't Steal a Wand
src.hits=0
remove
return 1
endif
src.message Select a player...
return 0
used with plevel 7 crashes the sphere here:
Source-X/src/game/chars/CCharSpell.cpp
Line 1411 in 5d62a1e
| pSpell->m_itSpell.m_PolyStr = (int16)pSpellDef->m_vcEffect.GetLinear(pCaster->Skill_GetBase((SKILL_TYPE)iSkill)) / 10; // % of damage reflected. |
because pCaster is null (defined here):
Source-X/src/game/chars/CCharSpell.cpp
Line 979 in 5d62a1e
| CChar *pCaster = pSpell->m_uidLink.CharFind(); |
But as it is neither magical, neither wand (by type, not by graphics), it should event try to cast the spell.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels