[7931] Allow GAMEOBJECT_TYPE_CAMERA gameobjects with event field set call DB scripts. Author: NoFantasy
Drop also redundent check preveting use SCRIPT_COMMAND_CAST_SPELL script command by gameobject script triggred casting. --HG-- branch : trunk
This commit is contained in:
@@ -4250,6 +4250,9 @@ void ObjectMgr::LoadEventScripts()
|
||||
if (goInfo->chest.eventId)
|
||||
evt_scripts.insert(goInfo->chest.eventId);
|
||||
break;
|
||||
case GAMEOBJECT_TYPE_CAMERA:
|
||||
if (goInfo->camera.eventID)
|
||||
evt_scripts.insert(goInfo->camera.eventID);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -4276,7 +4279,8 @@ void ObjectMgr::LoadEventScripts()
|
||||
{
|
||||
std::set<uint32>::const_iterator itr2 = evt_scripts.find(itr->first);
|
||||
if (itr2 == evt_scripts.end())
|
||||
sLog.outErrorDb("Table `event_scripts` has script (Id: %u) not referring to any gameobject_template type 10 data2 field or type 3 data6 field or any spell effect %u", itr->first, SPELL_EFFECT_SEND_EVENT);
|
||||
sLog.outErrorDb("Table `event_scripts` has script (Id: %u) not referring to any gameobject_template type 10 data2 field, type 3 data6 field, type 13 data 2 field or any spell effect %u",
|
||||
itr->first, SPELL_EFFECT_SEND_EVENT);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2434,12 +2434,6 @@ void World::ScriptsProcess()
|
||||
break;
|
||||
}
|
||||
|
||||
if(!source->isType(TYPEMASK_UNIT))
|
||||
{
|
||||
sLog.outError("SCRIPT_COMMAND_CAST_SPELL source caster isn't unit (TypeId: %u), skipping.",source->GetTypeId());
|
||||
break;
|
||||
}
|
||||
|
||||
Object* cmdTarget = step.script->datalong2 & 0x01 ? source : target;
|
||||
|
||||
if(!cmdTarget)
|
||||
|
||||
Reference in New Issue
Block a user