mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 17:51:28 +00:00
Merge pull request #1015 from EQEmu/checkinstancebycharid
Add CheckInstanceByCharID(instance_id, char_id) to Perl/Lua.
This commit is contained in:
commit
47e56f9381
@ -3124,6 +3124,25 @@ XS(XS__RemoveFromInstanceByCharID) {
|
|||||||
XSRETURN_EMPTY;
|
XSRETURN_EMPTY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
XS(XS__CheckInstanceByCharID);
|
||||||
|
XS(XS__CheckInstanceByCharID) {
|
||||||
|
dXSARGS;
|
||||||
|
if (items != 2) {
|
||||||
|
Perl_croak(aTHX_ "Usage: quest::CheckInstanceByCharID(uint16 instance_id, uint32 char_id)");
|
||||||
|
}
|
||||||
|
|
||||||
|
bool RETVAL;
|
||||||
|
dXSTARG;
|
||||||
|
|
||||||
|
uint16 instance_id = (int) SvUV(ST(0));
|
||||||
|
uint32 char_id = (int) SvUV(ST(1));
|
||||||
|
RETVAL = quest_manager.CheckInstanceByCharID(instance_id, char_id);
|
||||||
|
XSprePUSH;
|
||||||
|
PUSHu((IV) RETVAL);
|
||||||
|
|
||||||
|
XSRETURN(1);
|
||||||
|
}
|
||||||
|
|
||||||
XS(XS__RemoveAllFromInstance);
|
XS(XS__RemoveAllFromInstance);
|
||||||
XS(XS__RemoveAllFromInstance) {
|
XS(XS__RemoveAllFromInstance) {
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
@ -3988,6 +4007,7 @@ EXTERN_C XS(boot_quest) {
|
|||||||
newXS(strcpy(buf, "RemoveAllFromInstance"), XS__RemoveAllFromInstance, file);
|
newXS(strcpy(buf, "RemoveAllFromInstance"), XS__RemoveAllFromInstance, file);
|
||||||
newXS(strcpy(buf, "RemoveFromInstance"), XS__RemoveFromInstance, file);
|
newXS(strcpy(buf, "RemoveFromInstance"), XS__RemoveFromInstance, file);
|
||||||
newXS(strcpy(buf, "RemoveFromInstanceByCharID"), XS__RemoveFromInstanceByCharID, file);
|
newXS(strcpy(buf, "RemoveFromInstanceByCharID"), XS__RemoveFromInstanceByCharID, file);
|
||||||
|
newXS(strcpy(buf, "CheckInstanceByCharID"), XS__CheckInstanceByCharID, file);
|
||||||
newXS(strcpy(buf, "SendMail"), XS__SendMail, file);
|
newXS(strcpy(buf, "SendMail"), XS__SendMail, file);
|
||||||
newXS(strcpy(buf, "SetRunning"), XS__SetRunning, file);
|
newXS(strcpy(buf, "SetRunning"), XS__SetRunning, file);
|
||||||
newXS(strcpy(buf, "activespeakactivity"), XS__activespeakactivity, file);
|
newXS(strcpy(buf, "activespeakactivity"), XS__activespeakactivity, file);
|
||||||
|
|||||||
@ -938,6 +938,10 @@ void lua_remove_from_instance_by_char_id(uint32 instance_id, uint32 char_id) {
|
|||||||
quest_manager.RemoveFromInstanceByCharID(instance_id, char_id);
|
quest_manager.RemoveFromInstanceByCharID(instance_id, char_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool lua_check_instance_by_char_id(uint32 instance_id, uint32 char_id) {
|
||||||
|
return quest_manager.CheckInstanceByCharID(instance_id, char_id);
|
||||||
|
}
|
||||||
|
|
||||||
void lua_remove_all_from_instance(uint32 instance_id) {
|
void lua_remove_all_from_instance(uint32 instance_id) {
|
||||||
quest_manager.RemoveAllFromInstance(instance_id);
|
quest_manager.RemoveAllFromInstance(instance_id);
|
||||||
}
|
}
|
||||||
@ -1777,6 +1781,7 @@ luabind::scope lua_register_general() {
|
|||||||
luabind::def("assign_raid_to_instance", &lua_assign_raid_to_instance),
|
luabind::def("assign_raid_to_instance", &lua_assign_raid_to_instance),
|
||||||
luabind::def("remove_from_instance", &lua_remove_from_instance),
|
luabind::def("remove_from_instance", &lua_remove_from_instance),
|
||||||
luabind::def("remove_from_instance_by_char_id", &lua_remove_from_instance_by_char_id),
|
luabind::def("remove_from_instance_by_char_id", &lua_remove_from_instance_by_char_id),
|
||||||
|
luabind::def("check_instance_by_char_id", (bool(*)(uint16, uint32))&lua_check_instance_by_char_id),
|
||||||
luabind::def("remove_all_from_instance", &lua_remove_all_from_instance),
|
luabind::def("remove_all_from_instance", &lua_remove_all_from_instance),
|
||||||
luabind::def("flag_instance_by_group_leader", &lua_flag_instance_by_group_leader),
|
luabind::def("flag_instance_by_group_leader", &lua_flag_instance_by_group_leader),
|
||||||
luabind::def("flag_instance_by_raid_leader", &lua_flag_instance_by_raid_leader),
|
luabind::def("flag_instance_by_raid_leader", &lua_flag_instance_by_raid_leader),
|
||||||
|
|||||||
@ -2866,6 +2866,10 @@ void QuestManager::RemoveFromInstanceByCharID(uint16 instance_id, uint32 char_id
|
|||||||
database.RemoveClientFromInstance(instance_id, char_id);
|
database.RemoveClientFromInstance(instance_id, char_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool QuestManager::CheckInstanceByCharID(uint16 instance_id, uint32 char_id) {
|
||||||
|
return database.CharacterInInstanceGroup(instance_id, char_id);
|
||||||
|
}
|
||||||
|
|
||||||
void QuestManager::RemoveAllFromInstance(uint16 instance_id)
|
void QuestManager::RemoveAllFromInstance(uint16 instance_id)
|
||||||
{
|
{
|
||||||
QuestManagerCurrentQuestVars();
|
QuestManagerCurrentQuestVars();
|
||||||
|
|||||||
@ -246,6 +246,7 @@ public:
|
|||||||
void AssignRaidToInstance(uint16 instance_id);
|
void AssignRaidToInstance(uint16 instance_id);
|
||||||
void RemoveFromInstance(uint16 instance_id);
|
void RemoveFromInstance(uint16 instance_id);
|
||||||
void RemoveFromInstanceByCharID(uint16 instance_id, uint32 char_id);
|
void RemoveFromInstanceByCharID(uint16 instance_id, uint32 char_id);
|
||||||
|
bool CheckInstanceByCharID(uint16 instance_id, uint32 char_id);
|
||||||
//void RemoveGroupFromInstance(uint16 instance_id); //potentially useful but not implmented at this time.
|
//void RemoveGroupFromInstance(uint16 instance_id); //potentially useful but not implmented at this time.
|
||||||
//void RemoveRaidFromInstance(uint16 instance_id); //potentially useful but not implmented at this time.
|
//void RemoveRaidFromInstance(uint16 instance_id); //potentially useful but not implmented at this time.
|
||||||
void RemoveAllFromInstance(uint16 instance_id);
|
void RemoveAllFromInstance(uint16 instance_id);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user