mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
Replaced npcspecialatk with special_attacks, needs more testing also gotta export new api for it as I can't remove the legacy one. Too many quests rely on the legacy functionality.
This commit is contained in:
+12
-2
@@ -16,8 +16,6 @@
|
||||
|
||||
#include "StringUtil.h"
|
||||
|
||||
#include <string>
|
||||
#include <cstdarg>
|
||||
#include <cstring> // for strncpy
|
||||
#include <stdexcept>
|
||||
|
||||
@@ -328,3 +326,15 @@ const char *ConvertArrayF(float input, char *returnchar)
|
||||
sprintf(returnchar, "%0.2f", input);
|
||||
return returnchar;
|
||||
}
|
||||
|
||||
std::vector<std::string> SplitString(const std::string &str, char delim) {
|
||||
std::vector<std::string> ret;
|
||||
std::stringstream ss(str);
|
||||
std::string item;
|
||||
|
||||
while(std::getline(ss, item, delim)) {
|
||||
ret.push_back(item);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
+4
-1
@@ -16,7 +16,8 @@
|
||||
#ifndef _STRINGUTIL_H_
|
||||
#define _STRINGUTIL_H_
|
||||
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
#include <cstdarg>
|
||||
#include "types.h"
|
||||
|
||||
@@ -48,4 +49,6 @@ const char *ConvertArrayF(float input, char *returnchar);
|
||||
void RemoveApostrophes(std::string &s);
|
||||
char *RemoveApostrophes(const char *s);
|
||||
|
||||
std::vector<std::string> SplitString(const std::string &s, char delim);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user