mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 14:41:28 +00:00
[Cleanup] Delete embxs.cpp/embxs.h (#3284)
* [Cleanup] Delete embxs.cpp/embxs.h # Notes - These files and the one method in them are unused. * Update embperl.cpp
This commit is contained in:
parent
933d856b5b
commit
a7e95d7818
@ -32,7 +32,6 @@ SET(zone_sources
|
|||||||
embparser.cpp
|
embparser.cpp
|
||||||
embparser_api.cpp
|
embparser_api.cpp
|
||||||
embperl.cpp
|
embperl.cpp
|
||||||
embxs.cpp
|
|
||||||
encounter.cpp
|
encounter.cpp
|
||||||
entity.cpp
|
entity.cpp
|
||||||
exp.cpp
|
exp.cpp
|
||||||
@ -77,7 +76,6 @@ SET(zone_sources
|
|||||||
lua_spell.cpp
|
lua_spell.cpp
|
||||||
lua_stat_bonuses.cpp
|
lua_stat_bonuses.cpp
|
||||||
embperl.cpp
|
embperl.cpp
|
||||||
embxs.cpp
|
|
||||||
entity.cpp
|
entity.cpp
|
||||||
exp.cpp
|
exp.cpp
|
||||||
fearpath.cpp
|
fearpath.cpp
|
||||||
@ -186,7 +184,6 @@ SET(zone_headers
|
|||||||
dynamic_zone.h
|
dynamic_zone.h
|
||||||
embparser.h
|
embparser.h
|
||||||
embperl.h
|
embperl.h
|
||||||
embxs.h
|
|
||||||
encounter.h
|
encounter.h
|
||||||
entity.h
|
entity.h
|
||||||
errmsg.h
|
errmsg.h
|
||||||
|
|||||||
@ -27,7 +27,6 @@
|
|||||||
|
|
||||||
#include "dialogue_window.h"
|
#include "dialogue_window.h"
|
||||||
#include "embperl.h"
|
#include "embperl.h"
|
||||||
#include "embxs.h"
|
|
||||||
#include "entity.h"
|
#include "entity.h"
|
||||||
#include "expedition.h"
|
#include "expedition.h"
|
||||||
#include "queryserv.h"
|
#include "queryserv.h"
|
||||||
@ -4513,7 +4512,6 @@ void perl_register_quest()
|
|||||||
package.add("getfactionname", &Perl__getfactionname);
|
package.add("getfactionname", &Perl__getfactionname);
|
||||||
package.add("getinventoryslotid", &Perl__getinventoryslotid);
|
package.add("getinventoryslotid", &Perl__getinventoryslotid);
|
||||||
package.add("getitemname", &Perl__getitemname);
|
package.add("getitemname", &Perl__getitemname);
|
||||||
package.add("getItemName", &Perl__qc_getItemName);
|
|
||||||
package.add("getitemstat", &Perl__getitemstat);
|
package.add("getitemstat", &Perl__getitemstat);
|
||||||
package.add("getlanguagename", &Perl__getlanguagename);
|
package.add("getlanguagename", &Perl__getlanguagename);
|
||||||
package.add("getldonthemename", &Perl__getldonthemename);
|
package.add("getldonthemename", &Perl__getldonthemename);
|
||||||
|
|||||||
@ -322,6 +322,47 @@ bool Embperl::VarExists(const char *package, const char *var) {
|
|||||||
return(hv_exists(stash, var, len));
|
return(hv_exists(stash, var, len));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef EMBPERL_IO_CAPTURE
|
||||||
|
|
||||||
|
XS(XS_EQEmuIO_PRINT); /* prototype to pass -Wmissing-prototypes */
|
||||||
|
XS(XS_EQEmuIO_PRINT)
|
||||||
|
{
|
||||||
|
dXSARGS;
|
||||||
|
if (items < 2) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int r = 1; r < items; r++) {
|
||||||
|
char *str = SvPV_nolen(ST(r));
|
||||||
|
char *cur = str;
|
||||||
|
|
||||||
|
/* Strip newlines from log message 'str' */
|
||||||
|
*std::remove(str, str + strlen(str), '\n') = '\0';
|
||||||
|
|
||||||
|
std::string log_string = str;
|
||||||
|
|
||||||
|
if (
|
||||||
|
log_string.find("did not return a true") != std::string::npos ||
|
||||||
|
log_string.find("is experimental") != std::string::npos
|
||||||
|
) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; *cur != '\0'; i++, cur++) {
|
||||||
|
if (*cur == '\n') {
|
||||||
|
LogQuests("{}", str);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!log_string.empty()) {
|
||||||
|
LogQuests("{}", log_string);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
XSRETURN_EMPTY;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif //EMBPERL_IO_CAPTURE
|
||||||
|
|
||||||
#endif //EMBPERL
|
#endif //EMBPERL
|
||||||
|
|
||||||
|
|||||||
@ -1,95 +0,0 @@
|
|||||||
/* EQEMu: Everquest Server Emulator
|
|
||||||
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.org)
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; version 2 of the License.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
|
||||||
are required to give you total support for your newly bought product;
|
|
||||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
||||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef EMBPERL
|
|
||||||
|
|
||||||
#include "../common/global_define.h"
|
|
||||||
#include "../common/eqemu_logsys.h"
|
|
||||||
#include "embxs.h"
|
|
||||||
#include "embperl.h"
|
|
||||||
#include "masterentity.h"
|
|
||||||
#include "command.h"
|
|
||||||
|
|
||||||
const char *getItemName(unsigned itemid)
|
|
||||||
{
|
|
||||||
const EQ::ItemData* item = nullptr;
|
|
||||||
item = database.GetItem(itemid);
|
|
||||||
|
|
||||||
if (item)
|
|
||||||
return item->Name;
|
|
||||||
else
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char* Perl__qc_getItemName(unsigned itemid)
|
|
||||||
{
|
|
||||||
return getItemName(itemid); // possible nullptr return
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef EMBPERL_IO_CAPTURE
|
|
||||||
|
|
||||||
XS(XS_EQEmuIO_PRINT); /* prototype to pass -Wmissing-prototypes */
|
|
||||||
XS(XS_EQEmuIO_PRINT)
|
|
||||||
{
|
|
||||||
dXSARGS;
|
|
||||||
if (items < 2)
|
|
||||||
return;
|
|
||||||
// Perl_croak(aTHX_ "Usage: EQEmuIO::PRINT(@strings)");
|
|
||||||
|
|
||||||
int r;
|
|
||||||
for (r = 1; r < items; r++) {
|
|
||||||
char *str = SvPV_nolen(ST(r));
|
|
||||||
char *cur = str;
|
|
||||||
|
|
||||||
/* Strip newlines from log message 'str' */
|
|
||||||
*std::remove(str, str + strlen(str), '\n') = '\0';
|
|
||||||
|
|
||||||
std::string log_string = str;
|
|
||||||
|
|
||||||
if (log_string.find("did not return a true") != std::string::npos) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (log_string.find("is experimental") != std::string::npos) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
int i;
|
|
||||||
int pos = 0;
|
|
||||||
int len = 0;
|
|
||||||
|
|
||||||
for (i = 0; *cur != '\0'; i++, cur++) {
|
|
||||||
if (*cur == '\n') {
|
|
||||||
LogQuests("{}", str);
|
|
||||||
len = 0;
|
|
||||||
pos = i + 1;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
len++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!log_string.empty()) {
|
|
||||||
LogQuests("{}", log_string);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
XSRETURN_EMPTY;
|
|
||||||
}
|
|
||||||
#endif //EMBPERL_IO_CAPTURE
|
|
||||||
|
|
||||||
#endif // EMBPERL
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
#ifndef EMBXS_H
|
|
||||||
#define EMBXS_H
|
|
||||||
|
|
||||||
const char *getItemName(unsigned itemid);
|
|
||||||
const char* Perl__qc_getItemName(unsigned itemid);
|
|
||||||
|
|
||||||
#endif // EMBXS_H
|
|
||||||
Loading…
x
Reference in New Issue
Block a user