Skip to content

Commit 2b890f1

Browse files
committed
up
1 parent a67aeec commit 2b890f1

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

Entity.cs

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,15 @@ public void baseCall(string methodname, params object[] arguments)
172172
return;
173173
}
174174

175+
ScriptModule module = null;
176+
if(!EntityDef.moduledefs.TryGetValue(className, out module))
177+
{
178+
Dbg.ERROR_MSG("entity::baseCall: entity-module(" + className + ") error!");
179+
return;
180+
}
181+
175182
Method method = null;
176-
if(!EntityDef.moduledefs[className].base_methods.TryGetValue(methodname, out method))
183+
if(!module.base_methods.TryGetValue(methodname, out method))
177184
{
178185
Dbg.ERROR_MSG(className + "::baseCall(" + methodname + "), not found method!");
179186
return;
@@ -222,8 +229,15 @@ public void cellCall(string methodname, params object[] arguments)
222229
return;
223230
}
224231

232+
ScriptModule module = null;
233+
if(!EntityDef.moduledefs.TryGetValue(className, out module))
234+
{
235+
Dbg.ERROR_MSG("entity::cellCall: entity-module(" + className + ") error!");
236+
return;
237+
}
238+
225239
Method method = null;
226-
if(!EntityDef.moduledefs[className].cell_methods.TryGetValue(methodname, out method))
240+
if(!module.cell_methods.TryGetValue(methodname, out method))
227241
{
228242
Dbg.ERROR_MSG(className + "::cellCall(" + methodname + "), not found method!");
229243
return;

0 commit comments

Comments
 (0)