Merge branch 'fixes'

feature/prepare-cross-merge
Nuno 4 years ago committed by kaetemi
parent d33f6b283f
commit b76ac3d37f
No known key found for this signature in database
GPG Key ID: 9873C4D40BB479BC

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

Loading…
Cancel
Save