|
|
|
@ -2641,8 +2641,8 @@ void emote_s_(CStateInstance* entity, CScriptStack& stack)
|
|
|
|
|
void rename_s_(CStateInstance* entity, CScriptStack& stack)
|
|
|
|
|
{
|
|
|
|
|
string newName = (string)stack.top(); stack.pop();
|
|
|
|
|
|
|
|
|
|
CGroup* group = entity->getGroup();
|
|
|
|
|
ucstring name;
|
|
|
|
|
name.fromUtf8(newName); CGroup* group = entity->getGroup();
|
|
|
|
|
|
|
|
|
|
if (group->isSpawned())
|
|
|
|
|
{
|
|
|
|
@ -2657,8 +2657,6 @@ void rename_s_(CStateInstance* entity, CScriptStack& stack)
|
|
|
|
|
if (spawnBot)
|
|
|
|
|
{
|
|
|
|
|
TDataSetRow row = spawnBot->dataSetRow();
|
|
|
|
|
ucstring name;
|
|
|
|
|
name.fromUtf8(newName);
|
|
|
|
|
NLNET::CMessage msgout("CHARACTER_NAME");
|
|
|
|
|
msgout.serial(row);
|
|
|
|
|
msgout.serial(name);
|
|
|
|
@ -3083,7 +3081,7 @@ void setEventCode_sss_(CStateInstance* entity, CScriptStack& stack)
|
|
|
|
|
event = new CAIEventReaction(sm, stateEventAlias, eventDescription.EventType);
|
|
|
|
|
event->processEventDescription(&eventDescription, sm);
|
|
|
|
|
event->setGroup(npcGroup->getAlias());
|
|
|
|
|
nlinfo("Add Event: %s(%d) in State : %d", event_name.c_str(), stateEventAlias, statePositional->getAlias());
|
|
|
|
|
nlinfo("Add Event: %s(%d) in State : %d for group %d", event_name.c_str(), stateEventAlias, statePositional->getAlias(), npcGroup->getAlias());
|
|
|
|
|
event->setState(statePositional->getAlias());
|
|
|
|
|
npcGroup->setStateEventAlias(event_name, stateEventAlias);
|
|
|
|
|
|
|
|
|
|