mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[9869] Extend SCRIPT_COMMAND_QUEST_EXPLORED to allow player<->player as source/target
Additional code cleanup and output script id in error messages. Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
c5008073f3
commit
d02313d94c
2 changed files with 14 additions and 15 deletions
|
|
@ -3212,13 +3212,13 @@ void Map::ScriptsProcess()
|
||||||
{
|
{
|
||||||
if (!source)
|
if (!source)
|
||||||
{
|
{
|
||||||
sLog.outError("SCRIPT_COMMAND_QUEST_EXPLORED call for NULL source.");
|
sLog.outError("SCRIPT_COMMAND_QUEST_EXPLORED (script id %u) call for NULL source.", step.script->id);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!target)
|
if (!target)
|
||||||
{
|
{
|
||||||
sLog.outError("SCRIPT_COMMAND_QUEST_EXPLORED call for NULL target.");
|
sLog.outError("SCRIPT_COMMAND_QUEST_EXPLORED (script id %u) call for NULL target.", step.script->id);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3228,9 +3228,9 @@ void Map::ScriptsProcess()
|
||||||
|
|
||||||
if (target->GetTypeId() == TYPEID_PLAYER)
|
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||||
{
|
{
|
||||||
if(source->GetTypeId()!=TYPEID_UNIT && source->GetTypeId()!=TYPEID_GAMEOBJECT)
|
if (source->GetTypeId() != TYPEID_UNIT && source->GetTypeId() != TYPEID_GAMEOBJECT && source->GetTypeId() != TYPEID_PLAYER)
|
||||||
{
|
{
|
||||||
sLog.outError("SCRIPT_COMMAND_QUEST_EXPLORED call for non-creature and non-gameobject (TypeId: %u), skipping.",source->GetTypeId());
|
sLog.outError("SCRIPT_COMMAND_QUEST_EXPLORED (script id %u) call for non-creature, non-gameobject or non-player (TypeId: %u), skipping.", step.script->id, source->GetTypeId());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3239,15 +3239,15 @@ void Map::ScriptsProcess()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(target->GetTypeId()!=TYPEID_UNIT && target->GetTypeId()!=TYPEID_GAMEOBJECT)
|
if (target->GetTypeId() != TYPEID_UNIT && target->GetTypeId() != TYPEID_GAMEOBJECT && target->GetTypeId() != TYPEID_PLAYER)
|
||||||
{
|
{
|
||||||
sLog.outError("SCRIPT_COMMAND_QUEST_EXPLORED call for non-creature and non-gameobject (TypeId: %u), skipping.",target->GetTypeId());
|
sLog.outError("SCRIPT_COMMAND_QUEST_EXPLORED (script id %u) call for non-creature, non-gameobject or non-player (TypeId: %u), skipping.", step.script->id, target->GetTypeId());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (source->GetTypeId() != TYPEID_PLAYER)
|
if (source->GetTypeId() != TYPEID_PLAYER)
|
||||||
{
|
{
|
||||||
sLog.outError("SCRIPT_COMMAND_QUEST_EXPLORED call for non-player(TypeId: %u), skipping.",source->GetTypeId());
|
sLog.outError("SCRIPT_COMMAND_QUEST_EXPLORED (script id %u) call for non-player (TypeId: %u), skipping.", step.script->id, source->GetTypeId());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3264,7 +3264,6 @@ void Map::ScriptsProcess()
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case SCRIPT_COMMAND_ACTIVATE_OBJECT:
|
case SCRIPT_COMMAND_ACTIVATE_OBJECT:
|
||||||
{
|
{
|
||||||
if(!source)
|
if(!source)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "9868"
|
#define REVISION_NR "9869"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue