From 4c5117cabe3d39d5e4b507290b0774a1a5dafc36 Mon Sep 17 00:00:00 2001 From: Arthur Ice Date: Sun, 30 Nov 2014 21:42:59 -0800 Subject: [PATCH] QuestManager::CreateGroundObject converted to xyz_heading --- zone/embparser_api.cpp | 24 ++++++++++++------------ zone/lua_general.cpp | 4 ++-- zone/questmgr.cpp | 4 ++-- zone/questmgr.h | 4 ++-- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/zone/embparser_api.cpp b/zone/embparser_api.cpp index 0e8b10a8e..b1f3c126d 100644 --- a/zone/embparser_api.cpp +++ b/zone/embparser_api.cpp @@ -31,7 +31,7 @@ #include "queryserv.h" extern Zone* zone; -extern QueryServ* QServ; +extern QueryServ* QServ; /* @@ -1174,7 +1174,7 @@ XS(XS__createguild) Perl_croak(aTHX_ "Usage: createguild(guild_name, leader)"); char * guild_name = (char *)SvPV_nolen(ST(0)); - char * leader = (char *)SvPV_nolen(ST(1)); + char * leader = (char *)SvPV_nolen(ST(1)); quest_manager.CreateGuild(guild_name, leader); @@ -2668,10 +2668,10 @@ XS(XS__CreateGroundObject) uint16 id = 0; if(items == 5) - id = quest_manager.CreateGroundObject(itemid, x, y, z, heading); + id = quest_manager.CreateGroundObject(itemid, xyz_heading(x, y, z, heading)); else{ uint32 decay_time = (uint32)SvIV(ST(5)); - id = quest_manager.CreateGroundObject(itemid, x, y, z, heading, decay_time); + id = quest_manager.CreateGroundObject(itemid, xyz_heading(x, y, z, heading), decay_time); } XSRETURN_IV(id); @@ -3289,7 +3289,7 @@ XS(XS__GetZoneID) char *zone = (char *)SvPV_nolen(ST(0)); int32 id = quest_manager.GetZoneID(zone); - + XSRETURN_IV(id); } @@ -3302,7 +3302,7 @@ XS(XS__GetZoneLongName) dXSTARG; char *zone = (char *)SvPV_nolen(ST(0)); Const_char* RETVAL = quest_manager.GetZoneLongName(zone); - + sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG; XSRETURN(1); } @@ -3432,7 +3432,7 @@ XS(XS__clear_npctype_cache) int32 npctype_id = (int32)SvIV(ST(0)); quest_manager.ClearNPCTypeCache(npctype_id); } - + XSRETURN_EMPTY; } @@ -3455,11 +3455,11 @@ XS(XS__qs_player_event); XS(XS__qs_player_event) { dXSARGS; - if (items != 2){ + if (items != 2){ Perl_croak(aTHX_ "Usage: qs_player_event(char_id, event_desc)"); } else{ - int char_id = (int)SvIV(ST(0)); + int char_id = (int)SvIV(ST(0)); std::string event_desc = (std::string)SvPV_nolen(ST(1)); QServ->PlayerLogEvent(Player_Log_Quest, char_id, event_desc); } @@ -3494,7 +3494,7 @@ XS(XS__crosszonesignalnpcbynpctypeid) if (items == 2) { uint32 npctype_id = (uint32)SvIV(ST(0)); - uint32 data = (uint32)SvIV(ST(1)); + uint32 data = (uint32)SvIV(ST(1)); quest_manager.CrossZoneSignalNPCByNPCTypeID(npctype_id, data); } @@ -3725,8 +3725,8 @@ EXTERN_C XS(boot_quest) newXS(strcpy(buf, "enablerecipe"), XS__enablerecipe, file); newXS(strcpy(buf, "disablerecipe"), XS__disablerecipe, file); newXS(strcpy(buf, "clear_npctype_cache"), XS__clear_npctype_cache, file); - newXS(strcpy(buf, "qs_send_query"), XS__qs_send_query, file); - newXS(strcpy(buf, "qs_player_event"), XS__qs_player_event, file); + newXS(strcpy(buf, "qs_send_query"), XS__qs_send_query, file); + newXS(strcpy(buf, "qs_player_event"), XS__qs_player_event, file); newXS(strcpy(buf, "crosszonesetentityvariablebynpctypeid"), XS__crosszonesetentityvariablebynpctypeid, file); newXS(strcpy(buf, "crosszonesignalnpcbynpctypeid"), XS__crosszonesignalnpcbynpctypeid, file); XSRETURN_YES; diff --git a/zone/lua_general.cpp b/zone/lua_general.cpp index f18ff95fb..6513d967f 100644 --- a/zone/lua_general.cpp +++ b/zone/lua_general.cpp @@ -685,11 +685,11 @@ int lua_get_level(int type) { } void lua_create_ground_object(uint32 item_id, float x, float y, float z, float h) { - quest_manager.CreateGroundObject(item_id, x, y, z, h); + quest_manager.CreateGroundObject(item_id, xyz_heading(x, y, z, h)); } void lua_create_ground_object(uint32 item_id, float x, float y, float z, float h, uint32 decay_time) { - quest_manager.CreateGroundObject(item_id, x, y, z, h, decay_time); + quest_manager.CreateGroundObject(item_id, xyz_heading(x, y, z, h), decay_time); } void lua_create_ground_object_from_model(const char *model, float x, float y, float z, float h) { diff --git a/zone/questmgr.cpp b/zone/questmgr.cpp index ccf4ef8ea..5afd56efb 100644 --- a/zone/questmgr.cpp +++ b/zone/questmgr.cpp @@ -2342,10 +2342,10 @@ int QuestManager::getlevel(uint8 type) return 0; } -uint16 QuestManager::CreateGroundObject(uint32 itemid, float x, float y, float z, float heading, uint32 decay_time) +uint16 QuestManager::CreateGroundObject(uint32 itemid, const xyz_heading& position, uint32 decay_time) { uint16 entid = 0; //safety check - entid = entity_list.CreateGroundObject(itemid, xyz_heading(x, y, z, heading), decay_time); + entid = entity_list.CreateGroundObject(itemid, position, decay_time); return entid; } diff --git a/zone/questmgr.h b/zone/questmgr.h index 6b47bab04..41314b212 100644 --- a/zone/questmgr.h +++ b/zone/questmgr.h @@ -207,7 +207,7 @@ public: void enabletitle(int titleset); bool checktitle(int titlecheck); void removetitle(int titlecheck); - uint16 CreateGroundObject(uint32 itemid, float x, float y, float z, float heading, uint32 decay_time = 300000); + uint16 CreateGroundObject(uint32 itemid, const xyz_heading& position, uint32 decay_time = 300000); uint16 CreateGroundObjectFromModel(const char* model, float x, float y, float z, float heading, uint8 type = 0x00, uint32 decay_time = 0); void ModifyNPCStat(const char *identifier, const char *newValue); void UpdateSpawnTimer(uint32 id, uint32 newTime); @@ -240,7 +240,7 @@ public: uint16 CreateDoor( const char* model, float x, float y, float z, float heading, uint8 opentype, uint16 size); int32 GetZoneID(const char *zone); const char *GetZoneLongName(const char *zone); - void CrossZoneSignalPlayerByCharID(int charid, uint32 data); + void CrossZoneSignalPlayerByCharID(int charid, uint32 data); void CrossZoneSignalNPCByNPCTypeID(uint32 npctype_id, uint32 data); void CrossZoneSignalPlayerByName(const char *CharName, uint32 data); void CrossZoneSetEntityVariableByNPCTypeID(uint32 npctype_id, const char *id, const char *m_var);