Yengine: avoid use of Enum.Parse

This commit is contained in:
UbitUmarov
2020-08-31 18:46:10 +01:00
parent 3c3553d5b1
commit a1239d2706
5 changed files with 52 additions and 21 deletions

View File

@@ -373,7 +373,7 @@ namespace OpenSim.Region.ScriptEngine.Yengine
for(lln = m_EventQueue.First; lln != null; lln = lln.Next)
{
evt = lln.Value;
evc = (ScriptEventCode)Enum.Parse(typeof(ScriptEventCode), evt.EventName);
m_eventCodeMap.TryGetValue(evt.EventName, out evc);
evc1 = (int)evc;
evc2 = evc1 - 32;
if((((uint)evc1 < (uint)32) && (((mask1 >> evc1) & 1) != 0)) ||