forked from mirror/openmw-tes3mp
[Server] Add script callbacks for object placement and deletion
This commit is contained in:
parent
35e453dec3
commit
f9feaf05f0
3 changed files with 15 additions and 0 deletions
|
@ -418,6 +418,12 @@ void Networking::processWorldPacket(RakNet::Packet *packet)
|
||||||
myPacket->Read(event);
|
myPacket->Read(event);
|
||||||
myPacket->Send(event, true);
|
myPacket->Send(event, true);
|
||||||
|
|
||||||
|
Script::Call<Script::CallbackIdentity("OnObjectPlace")>(
|
||||||
|
player->getId(),
|
||||||
|
event->cellRef.mRefID.c_str(),
|
||||||
|
event->cellRef.mRefNum.mIndex,
|
||||||
|
event->cell.getDescription().c_str());
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -435,6 +441,12 @@ void Networking::processWorldPacket(RakNet::Packet *packet)
|
||||||
|
|
||||||
myPacket->Send(event, true);
|
myPacket->Send(event, true);
|
||||||
|
|
||||||
|
Script::Call<Script::CallbackIdentity("OnObjectDelete")>(
|
||||||
|
player->getId(),
|
||||||
|
event->cellRef.mRefID.c_str(),
|
||||||
|
event->cellRef.mRefNum.mIndex,
|
||||||
|
event->cell.getDescription().c_str());
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
#define QUESTAPI \
|
#define QUESTAPI \
|
||||||
{"GetJournalChangesSize", QuestFunctions::GetJournalChangesSize},\
|
{"GetJournalChangesSize", QuestFunctions::GetJournalChangesSize},\
|
||||||
\
|
\
|
||||||
|
{"AddJournalEntry", QuestFunctions::AddJournalEntry},\
|
||||||
{"AddJournalIndex", QuestFunctions::AddJournalIndex},\
|
{"AddJournalIndex", QuestFunctions::AddJournalIndex},\
|
||||||
\
|
\
|
||||||
{"GetJournalItemQuest", QuestFunctions::GetJournalItemQuest},\
|
{"GetJournalItemQuest", QuestFunctions::GetJournalItemQuest},\
|
||||||
|
|
|
@ -114,6 +114,8 @@ public:
|
||||||
{"OnPlayerChangeInventory", Function<void, unsigned short>()},
|
{"OnPlayerChangeInventory", Function<void, unsigned short>()},
|
||||||
{"OnPlayerChangeSpellbook", Function<void, unsigned short, int>()},
|
{"OnPlayerChangeSpellbook", Function<void, unsigned short, int>()},
|
||||||
{"OnPlayerChangeJournal", Function<void, unsigned short>()},
|
{"OnPlayerChangeJournal", Function<void, unsigned short>()},
|
||||||
|
{"OnObjectPlace", Function<void, unsigned short, const char*, int, const char*>()},
|
||||||
|
{"OnObjectDelete", Function<void, unsigned short, const char*, int, const char*>()},
|
||||||
{"OnPlayerSendMessage", Function<bool, unsigned short, const char*>()},
|
{"OnPlayerSendMessage", Function<bool, unsigned short, const char*>()},
|
||||||
{"OnPlayerEndCharGen", Function<void, unsigned short>()},
|
{"OnPlayerEndCharGen", Function<void, unsigned short>()},
|
||||||
{"OnGUIAction", Function<void, unsigned short, int, const char*>()}
|
{"OnGUIAction", Function<void, unsigned short, int, const char*>()}
|
||||||
|
|
Loading…
Reference in a new issue