|
|
@ -184,8 +184,6 @@ void CAiWrapperServer::startAct(TSessionId sessionId, uint32 aiInstanceId, CPers
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void CAiWrapperServer::setAggroRange(NLMISC::CEntityId entityId, float range)
|
|
|
|
void CAiWrapperServer::setAggroRange(NLMISC::CEntityId entityId, float range)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
CMessage msgout("EXEC_COMMAND");
|
|
|
|
CMessage msgout("EXEC_COMMAND");
|
|
|
@ -210,10 +208,8 @@ void CAiWrapperServer::despawnEntity(NLMISC::CEntityId entityId, uint32 alias)
|
|
|
|
uint32 nbString=2;
|
|
|
|
uint32 nbString=2;
|
|
|
|
std::string eid = entityId.toString();
|
|
|
|
std::string eid = entityId.toString();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
std::string str = NLMISC::toString("()despawnBotByAlias(\"%s\");", aliasToString(alias).c_str());
|
|
|
|
std::string str = NLMISC::toString("()despawnBotByAlias(\"%s\");", aliasToString(alias).c_str());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CMessage msgout("R2_NPC_BOT_SCRIPT_BY_ID");
|
|
|
|
CMessage msgout("R2_NPC_BOT_SCRIPT_BY_ID");
|
|
|
|
msgout.serial(messageVersion);
|
|
|
|
msgout.serial(messageVersion);
|
|
|
|
msgout.serial(nbString);
|
|
|
|
msgout.serial(nbString);
|
|
|
@ -229,10 +225,8 @@ void CAiWrapperServer::setGrpHPLevel(NLMISC::CEntityId entityId, uint32 alias,
|
|
|
|
uint32 nbString=2;
|
|
|
|
uint32 nbString=2;
|
|
|
|
std::string eid = entityId.toString();
|
|
|
|
std::string eid = entityId.toString();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
std::string hpstr = NLMISC::toString("()setHPScale(%f);", hp);
|
|
|
|
std::string hpstr = NLMISC::toString("()setHPScale(%f);", hp);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//CMessage msgout("EVENT_NPC_GROUP_SCRIPT");
|
|
|
|
//CMessage msgout("EVENT_NPC_GROUP_SCRIPT");
|
|
|
|
CMessage msgout("R2_NPC_BOT_SCRIPT_BY_ID");
|
|
|
|
CMessage msgout("R2_NPC_BOT_SCRIPT_BY_ID");
|
|
|
|
msgout.serial(messageVersion);
|
|
|
|
msgout.serial(messageVersion);
|
|
|
@ -241,8 +235,6 @@ void CAiWrapperServer::setGrpHPLevel(NLMISC::CEntityId entityId, uint32 alias,
|
|
|
|
msgout.serial(hpstr);
|
|
|
|
msgout.serial(hpstr);
|
|
|
|
|
|
|
|
|
|
|
|
CUnifiedNetwork::getInstance()->send("AIS",msgout);
|
|
|
|
CUnifiedNetwork::getInstance()->send("AIS",msgout);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CAiWrapperServer::setHPLevel(NLMISC::CEntityId entityId, uint32 alias, float hp)
|
|
|
|
void CAiWrapperServer::setHPLevel(NLMISC::CEntityId entityId, uint32 alias, float hp)
|
|
|
@ -252,10 +244,8 @@ void CAiWrapperServer::setHPLevel(NLMISC::CEntityId entityId, uint32 alias, floa
|
|
|
|
uint32 nbString=2;
|
|
|
|
uint32 nbString=2;
|
|
|
|
std::string eid = entityId.toString();
|
|
|
|
std::string eid = entityId.toString();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
std::string hpstr = NLMISC::toString("()setBotHPScaleByAlias(%f, \"%s\");", hp, aliasToString(alias).c_str());
|
|
|
|
std::string hpstr = NLMISC::toString("()setBotHPScaleByAlias(%f, \"%s\");", hp, aliasToString(alias).c_str());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//CMessage msgout("EVENT_NPC_GROUP_SCRIPT");
|
|
|
|
//CMessage msgout("EVENT_NPC_GROUP_SCRIPT");
|
|
|
|
CMessage msgout("R2_NPC_BOT_SCRIPT_BY_ID");
|
|
|
|
CMessage msgout("R2_NPC_BOT_SCRIPT_BY_ID");
|
|
|
|
msgout.serial(messageVersion);
|
|
|
|
msgout.serial(messageVersion);
|
|
|
@ -264,9 +254,6 @@ void CAiWrapperServer::setHPLevel(NLMISC::CEntityId entityId, uint32 alias, floa
|
|
|
|
msgout.serial(hpstr);
|
|
|
|
msgout.serial(hpstr);
|
|
|
|
|
|
|
|
|
|
|
|
CUnifiedNetwork::getInstance()->send("AIS",msgout);
|
|
|
|
CUnifiedNetwork::getInstance()->send("AIS",msgout);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -378,7 +365,6 @@ void CAiWrapperServer::setPioneerRight(NLMISC::CEntityId entityId, const R2::TPi
|
|
|
|
msgout.serial(command);
|
|
|
|
msgout.serial(command);
|
|
|
|
CUnifiedNetwork::getInstance()->send("EGS",msgout);
|
|
|
|
CUnifiedNetwork::getInstance()->send("EGS",msgout);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (right == R2::TPioneerRight::Tester)
|
|
|
|
else if (right == R2::TPioneerRight::Tester)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -400,7 +386,6 @@ void CAiWrapperServer::setPioneerRight(NLMISC::CEntityId entityId, const R2::TPi
|
|
|
|
msgout.serial(command);
|
|
|
|
msgout.serial(command);
|
|
|
|
CUnifiedNetwork::getInstance()->send("EGS",msgout);
|
|
|
|
CUnifiedNetwork::getInstance()->send("EGS",msgout);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|