Renamed some of Get() methods to Find(), read more
From now on, ideally any function with "get" in the name should always return a valid value. A function with "find" in the name, however, does the same thing, but may also return an invalid result such as an error code.
This commit is contained in:
@@ -55,11 +55,11 @@ static int getCharacter(lua_State* L) {
|
||||
|
||||
switch(lua_type(L, 1)) {
|
||||
case LUA_TNUMBER:
|
||||
characterData = characterMgr.Get(lua_tointeger(L, 1));
|
||||
characterData = characterMgr.Find(lua_tointeger(L, 1));
|
||||
break;
|
||||
case LUA_TSTRING:
|
||||
//access characters via their handles
|
||||
characterData = characterMgr.Get(lua_tostring(L, 1));
|
||||
characterData = characterMgr.Find(lua_tostring(L, 1));
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user