This commit is contained in:
Image 2020-03-10 23:17:27 -04:00
commit 93f8bb1b7b
3 changed files with 29 additions and 4 deletions

View file

@ -71,6 +71,13 @@ extern MasterAAList master_aa_list;
extern MasterRaceTypeList race_types_list;
extern Classes classes;
//devn00b: Fix for linux builds since we dont use stricmp we use strcasecmp
#if defined(__GNUC__)
#define stricmp strcasecmp
#define strnicmp strncasecmp
#endif
EQ2Packet* RemoteCommands::serialize(){
buffer.clear();
vector<EQ2_RemoteCommandString>::iterator command_list;
@ -2775,7 +2782,13 @@ void Commands::Process(int32 index, EQ2_16BitString* command_parms, Client* clie
if(sep && sep->arg[0] && sep->IsNumber(0)){
val = atoi(sep->arg[0]);
database.insertCharacterProperty(client, CHAR_PROPERTY_INVUL, (val == 1) ? "1" : "0");
//devn00b: Fix for linux builds
#if defined(__GNUC__)
database.insertCharacterProperty(client, CHAR_PROPERTY_INVUL, (val == 1) ? (char*) 1 : 0);
#else
database.insertCharacterProperty(client, CHAR_PROPERTY_INVUL, (val == 1) ? "1" : "0");
#endif
// database.insertCharacterProperty(client, CHAR_PROPERTY_INVUL, (val == 1) ? "1" : "0");
client->GetPlayer()->SetInvulnerable(val==1);
if(client->GetPlayer()->GetInvulnerable())
@ -8879,4 +8892,4 @@ void Commands::Command_TargetItem(Client* client, Seperator* sep) {
Transmute::HandleConfirmResponse(client, client->GetPlayer(), reinterpret_cast<int32&>(item_id));
}
}
}
}

View file

@ -65,6 +65,12 @@ extern MasterCollectionList master_collection_list;
extern RuleManager rule_manager;
extern MasterLanguagesList master_languages_list;
//devn00b: Fix for linux builds since we dont use stricmp we use strcasecmp
#if defined(__GNUC__)
#define stricmp strcasecmp
#define strnicmp strncasecmp
#endif
WorldDatabase::WorldDatabase(){
}
@ -6576,4 +6582,4 @@ void WorldDatabase::FindSpell(Client* client, char* findString)
}
client->Message(CHANNEL_COLOR_YELLOW, "End Spell Results for %s", findString);
}
}
}

View file

@ -58,6 +58,11 @@ along with EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
#include <unistd.h>
#endif
#if defined(__GNUC__)
#define _snprintf snprintf
#endif
#include "client.h"
#include "../common/emu_opcodes.h"
#include "../common/packet_dump.h"
@ -1194,6 +1199,7 @@ bool Client::HandlePacket(EQApplicationPacket *app) {
widget->SetIncludeHeading(true);
spawn->position_changed = true;
_snprintf(query, 256, "open_heading=%f,include_heading=1", newHeading);
if (database.UpdateSpawnWidget(widget->GetWidgetID(), query))
SimpleMessage(CHANNEL_COLOR_YELLOW, "Successfully saved widget open heading information.");
@ -8110,4 +8116,4 @@ void Client::SetTransmuteID(int32 trans_id) {
int32 Client::GetTransmuteID() {
return transmuteID;
}
}