RemoveSkillBonus should work on NPC's now, fixed/added some additional logging info for SpawnGroupByID
This commit is contained in:
parent
a597a993c2
commit
0a1692b9a0
@ -2667,11 +2667,10 @@ int EQ2Emu_lua_RemoveSkillBonus(lua_State* state) {
|
||||
return 0;
|
||||
Spawn* spawn = lua_interface->GetSpawn(state);
|
||||
LuaSpell* luaspell = lua_interface->GetCurrentSpell(state);
|
||||
if (spawn && spawn->IsPlayer()) {
|
||||
lua_interface->ResetFunctionStack(state);
|
||||
int32 spell_id = 0;
|
||||
if (luaspell && luaspell->spell && luaspell->caster) {
|
||||
if(luaspell->resisted) {
|
||||
lua_interface->ResetFunctionStack(state);
|
||||
return 0;
|
||||
}
|
||||
spell_id = luaspell->spell->GetSpellID();
|
||||
@ -2713,7 +2712,6 @@ int EQ2Emu_lua_RemoveSkillBonus(lua_State* state) {
|
||||
else
|
||||
LogWrite(LUA__ERROR, 0, "LUA", "Error removing skill bonus on '%s'. Not a NPC or player.", spawn->GetName());
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -10804,7 +10802,7 @@ int EQ2Emu_lua_SpawnGroupByID(lua_State* state) {
|
||||
|
||||
ZoneServer* zone = lua_interface->GetZone(state, 1);
|
||||
if (!zone) {
|
||||
lua_interface->LogError("%s: LUA GetPlayersInZone command error: zone is not valid", lua_interface->GetScriptName(state));
|
||||
lua_interface->LogError("%s: LUA SpawnGroupByID command error: zone is not valid", lua_interface->GetScriptName(state));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -10826,7 +10824,7 @@ int EQ2Emu_lua_SpawnGroupByID(lua_State* state) {
|
||||
for (itr = locs->begin(); itr != locs->end(); itr++) {
|
||||
SpawnLocation* location = zone->GetSpawnLocation(itr->second);
|
||||
if (!location) {
|
||||
lua_interface->LogError("%s: LUA SpawnGroupByID command error: no location found for the given ID (%u)", lua_interface->GetScriptName(state), itr->second);
|
||||
lua_interface->LogError("%s: LUA SpawnGroupByID command error: no location found for group id %u and the given ID (%u)", lua_interface->GetScriptName(state), group_id, itr->second);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user