Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Checking mergeability… Don’t worry, you can still create the pull request.
  • 8 commits
  • 11 files changed
  • 0 commit comments
  • 1 contributor
Commits on Aug 19, 2012
@Kretol Kretol Change 'color' to 'flag' to allow coexistence with Trinity auth. d58609a
@Kretol Kretol Merge branch 'master' of https://github.com/ProjectSkyfire/SkyFireEMU 51a84ef
@Kretol Kretol Merge branch 'master' of https://github.com/ProjectSkyfire/SkyFireEMU 2faab6c
@Kretol Kretol Merge branch 'master' of https://github.com/ProjectSkyfire/SkyFireEMU 3d8ecaf
Commits on Aug 23, 2012
@Kretol Kretol Merge branch 'master' of https://github.com/ProjectSkyfire/SkyFireEMU a61ebd6
Commits on Aug 25, 2012
@Kretol Kretol Several custom changes
Make .tic view default to ID
Rename gmnameannounce to gmchat
Rename pinfo to playerinfo
Reenable PINFO_MAP_ONLINE with hardcoded map/area/zone to allow seeing phase of players
Disable 'worgen form on login'
b66e504
Commits on Nov 27, 2012
@Kretol Kretol Merge branch 'master' of https://github.com/ProjectSkyfire/SkyFireEMU
Conflicts:
	src/server/game/Chat/Chat.cpp
6f1149f
Commits on Dec 17, 2012
@Kretol Kretol Merge branch 'master' of https://github.com/ProjectSkyfire/SkyFireEMU
Conflicts:
	src/server/worldserver/Master.cpp
e7ab112
View
8 src/server/authserver/Realms/RealmList.cpp
@@ -32,7 +32,7 @@ void RealmList::Initialize(uint32 updateInterval)
UpdateRealms(true);
}
-void RealmList::UpdateRealm(uint32 ID, const std::string& name, const std::string& address, uint32 port, uint8 icon, uint8 color, uint8 timezone, AccountTypes allowedSecurityLevel, float popu, uint32 build)
+void RealmList::UpdateRealm(uint32 ID, const std::string& name, const std::string& address, uint32 port, uint8 icon, uint8 flag, uint8 timezone, AccountTypes allowedSecurityLevel, float popu, uint32 build)
{
// Create new if not exist or update existed
Realm& realm = m_realms[name];
@@ -40,7 +40,7 @@ void RealmList::UpdateRealm(uint32 ID, const std::string& name, const std::strin
realm.m_ID = ID;
realm.name = name;
realm.icon = icon;
- realm.color = color;
+ realm.flag = flag;
realm.timezone = timezone;
realm.allowedSecurityLevel = allowedSecurityLevel;
realm.populationLevel = popu;
@@ -85,13 +85,13 @@ void RealmList::UpdateRealms(bool init)
const std::string& address = fields[2].GetString();
uint32 port = fields[3].GetUInt32();
uint8 icon = fields[4].GetUInt8();
- uint8 color = fields[5].GetUInt8();
+ uint8 flag = fields[5].GetUInt8();
uint8 timezone = fields[6].GetUInt8();
uint8 allowedSecurityLevel = fields[7].GetUInt8();
float pop = fields[8].GetFloat();
uint32 build = fields[9].GetUInt32();
- UpdateRealm(realmId, name, address, port, icon, color, timezone, (allowedSecurityLevel <= SEC_ADMINISTRATOR ? AccountTypes(allowedSecurityLevel) : SEC_ADMINISTRATOR), pop, build);
+ UpdateRealm(realmId, name, address, port, icon, flag, timezone, (allowedSecurityLevel <= SEC_ADMINISTRATOR ? AccountTypes(allowedSecurityLevel) : SEC_ADMINISTRATOR), pop, build);
if (init)
sLog->outString("Added realm \"%s\".", fields[1].GetCString());
View
4 src/server/authserver/Realms/RealmList.h
@@ -31,7 +31,7 @@ struct Realm
std::string address;
std::string name;
uint8 icon;
- uint8 color;
+ uint8 flag;
uint8 timezone;
uint32 m_ID;
AccountTypes allowedSecurityLevel;
@@ -60,7 +60,7 @@ class RealmList
private:
void UpdateRealms(bool init = false);
- void UpdateRealm(uint32 ID, const std::string& name, const std::string& address, uint32 port, uint8 icon, uint8 color, uint8 timezone, AccountTypes allowedSecurityLevel, float popu, uint32 build);
+ void UpdateRealm(uint32 ID, const std::string& name, const std::string& address, uint32 port, uint8 icon, uint8 flag, uint8 timezone, AccountTypes allowedSecurityLevel, float popu, uint32 build);
RealmMap m_realms; ///< Internal map of realms
uint32 m_UpdateInterval;
View
2 src/server/authserver/Server/AuthSocket.cpp
@@ -879,7 +879,7 @@ bool AuthSocket::_HandleRealmList()
pkt << i->second.icon; // realm type
if (_expversion & (POST_BC_EXP_FLAG | POST_WOTLK_EXP_FLAG)) // 2.x, 3.x, and 4.x clients
pkt << lock; // if 1, then realm locked
- pkt << i->second.color; // if 2, then realm is offline
+ pkt << i->second.flag; // if 2, then realm is offline
pkt << i->first;
pkt << i->second.address;
pkt << i->second.populationLevel;
View
9 src/server/game/Chat/Chat.cpp
@@ -236,8 +236,8 @@ ChatCommand* ChatHandler::getCommandTable()
{
{ "list", SEC_MODERATOR, true, OldHandler<&ChatHandler::HandleGMTicketListCommand>, "", NULL },
{ "onlinelist", SEC_MODERATOR, true, OldHandler<&ChatHandler::HandleGMTicketListOnlineCommand>, "", NULL },
- { "viewname", SEC_MODERATOR, true, OldHandler<&ChatHandler::HandleGMTicketGetByNameCommand>, "", NULL },
{ "viewid", SEC_MODERATOR, true, OldHandler<&ChatHandler::HandleGMTicketGetByIdCommand>, "", NULL },
+ { "viewname", SEC_MODERATOR, true, OldHandler<&ChatHandler::HandleGMTicketGetByNameCommand>, "", NULL },
{ "close", SEC_MODERATOR, true, OldHandler<&ChatHandler::HandleGMTicketCloseByIdCommand>, "", NULL },
{ "closedlist", SEC_MODERATOR, true, OldHandler<&ChatHandler::HandleGMTicketListClosedCommand>, "", NULL },
{ "escalatedlist", SEC_GAMEMASTER, true, OldHandler<&ChatHandler::HandleGMTicketListEscalatedCommand>, "", NULL },
@@ -270,16 +270,13 @@ ChatCommand* ChatHandler::getCommandTable()
{ "cast", SEC_ADMINISTRATOR, false, NULL, "", castCommandTable },
{ "reset", SEC_ADMINISTRATOR, true, NULL, "", resetCommandTable },
{ "instance", SEC_ADMINISTRATOR, true, NULL, "", instanceCommandTable },
-
{ "channel", SEC_ADMINISTRATOR, true, NULL, "", channelCommandTable },
-
{ "pet", SEC_GAMEMASTER, false, NULL, "", petCommandTable },
{ "ticket", SEC_MODERATOR, false, NULL, "", ticketCommandTable },
-
{ "aura", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleAuraCommand>, "", NULL },
{ "unaura", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleUnAuraCommand>, "", NULL },
{ "nameannounce", SEC_MODERATOR, true, OldHandler<&ChatHandler::HandleNameAnnounceCommand>, "", NULL },
- { "gmnameannounce", SEC_MODERATOR, true, OldHandler<&ChatHandler::HandleGMNameAnnounceCommand>, "", NULL },
+ { "gmchat", SEC_MODERATOR, true, OldHandler<&ChatHandler::HandleGMNameAnnounceCommand>, "", NULL },
{ "announce", SEC_MODERATOR, true, OldHandler<&ChatHandler::HandleAnnounceCommand>, "", NULL },
{ "gmannounce", SEC_MODERATOR, true, OldHandler<&ChatHandler::HandleGMAnnounceCommand>, "", NULL },
{ "notify", SEC_MODERATOR, true, OldHandler<&ChatHandler::HandleNotifyCommand>, "", NULL },
@@ -322,7 +319,7 @@ ChatCommand* ChatHandler::getCommandTable()
{ "maxskill", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleMaxSkillCommand>, "", NULL },
{ "setskill", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleSetSkillCommand>, "", NULL },
{ "whispers", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleWhispersCommand>, "", NULL },
- { "pinfo", SEC_GAMEMASTER, true, OldHandler<&ChatHandler::HandlePInfoCommand>, "", NULL },
+ { "playerinfo", SEC_GAMEMASTER, true, OldHandler<&ChatHandler::HandlePInfoCommand>, "", NULL },
{ "respawn", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleRespawnCommand>, "", NULL },
{ "send", SEC_MODERATOR, true, NULL, "", sendCommandTable },
{ "mute", SEC_MODERATOR, true, OldHandler<&ChatHandler::HandleMuteCommand>, "", NULL },
View
6 src/server/game/Chat/Commands/Level2.cpp
@@ -445,9 +445,11 @@ bool ChatHandler::HandlePInfoCommand(const char* args)
if (target)
{
if (!zoneName.empty())
- PSendSysMessage(LANG_PINFO_MAP_ONLINE, map->name[locale], zoneName.c_str(), areaName.c_str(), phase);
+ //PSendSysMessage(LANG_PINFO_MAP_ONLINE, map->name[locale], zoneName.c_str(), areaName.c_str(), phase);
+ PSendSysMessage(LANG_PINFO_MAP_ONLINE, "<map>", "<area>", "<zone>", phase);
else
- PSendSysMessage(LANG_PINFO_MAP_ONLINE, map->name[locale], areaName.c_str(), "<unknown>", phase);
+ //PSendSysMessage(LANG_PINFO_MAP_ONLINE, map->name[locale], areaName.c_str(), "<unknown>", phase);
+ PSendSysMessage(LANG_PINFO_MAP_ONLINE, "<map>", "<area>", "<unknown>", phase);
}
else
PSendSysMessage(LANG_PINFO_MAP_OFFLINE, map->name[locale], areaName.c_str());
View
12 src/server/game/Entities/GameObject/GameObject.cpp
@@ -845,6 +845,15 @@ bool GameObject::IsDestructibleBuilding() const
return gInfo->type == GAMEOBJECT_TYPE_DESTRUCTIBLE_BUILDING;
}
+bool GameObject::IsStaticMO() const
+{
+ // If something is marked as a map object, don't transmit an out of range packet for it.
+ GameObjectTemplate const* gInfo = GetGOInfo();
+ if (!gInfo)
+ return false;
+ return gInfo->type == GAMEOBJECT_TYPE_MAP_OBJECT;
+}
+
Unit* GameObject::GetOwner() const
{
return ObjectAccessor::GetUnit(*this, GetOwnerGUID());
@@ -864,6 +873,9 @@ bool GameObject::IsAlwaysVisibleFor(WorldObject const* seer) const
if (IsTransport() || IsDestructibleBuilding())
return true;
+ if (IsStaticMO())
+ return true;
+
if (!seer)
return false;
View
1 src/server/game/Entities/GameObject/GameObject.h
@@ -635,6 +635,7 @@ class GameObject : public WorldObject, public GridObject<GameObject>
bool IsTransport() const;
bool IsDynTransport() const;
bool IsDestructibleBuilding() const;
+ bool IsStaticMO() const;
uint32 GetDBTableGUIDLow() const { return _DBTableGuid; }
View
4 src/server/game/Entities/Player/Player.cpp
@@ -18131,8 +18131,8 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
}
}
- if (HasAura(94293)) // Set Worgen form at login.
- CastSpell(this, 69001, true);
+ //if (HasAura(94293)) // Set Worgen form at login.
+ // CastSpell(this, 69001, true);
// RaF stuff.
_grantableLevels = fields[66].GetUInt32();
View
310 src/server/scripts/Commands/cs_misc.cpp
@@ -29,6 +29,14 @@ class misc_commandscript : public CommandScript
static ChatCommand commandTable[] =
{
{ "dev", SEC_ADMINISTRATOR, false, &HandleDevCommand, "", NULL },
+ // Custom stuff
+ { "addrpitem", SEC_PLAYER, false, &HandleAddRPItemCommand, "", NULL },
+ { "taxi", SEC_PLAYER, false, &HandleSelfTaxiCheatCommand, "", NULL },
+ { "scale", SEC_PLAYER, false, &HandleSelfScaleCommand, "", NULL },
+ { "playlocal", SEC_GAMEMASTER, false, &HandlePlayLocalCommand, "", NULL },
+ { "morph", SEC_GAMEMASTER, false, &HandleSelfMorphCommand, "", NULL },
+ { "additemall", SEC_ADMINISTRATOR, false, &HandleAddItemAllCommand, "", NULL },
+ { "unauraall", SEC_ADMINISTRATOR, false, &HandleUnAuraAllCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
return commandTable;
@@ -65,6 +73,308 @@ class misc_commandscript : public CommandScript
handler->SetSentErrorMessage(true);
return false;
}
+
+ static bool HandleAddRPItemCommand(ChatHandler* handler, char const* args)
+ {
+ if (!*args)
+ return false;
+
+ uint32 itemId = 0;
+
+ if (args[0] == '[') // [name] manual form
+ {
+ char* citemName = strtok((char*)args, "]");
+
+ if (citemName && citemName[0])
+ {
+ std::string itemName = citemName+1;
+ WorldDatabase.EscapeString(itemName);
+ QueryResult result = WorldDatabase.PQuery("SELECT entry FROM item_template WHERE entry>200000 AND name = '%s'", itemName.c_str());
+ if (!result)
+ {
+ handler->PSendSysMessage(LANG_COMMAND_COULDNOTFIND, citemName+1);
+ handler->SetSentErrorMessage(true);
+ return false;
+ }
+ itemId = result->Fetch()->GetUInt16();
+ }
+ else
+ return false;
+ }
+ else // item_id or [name] Shift-click form |color|Hitem:item_id:0:0:0|h[name]|h|r
+ {
+ char* cId = handler->extractKeyFromLink((char*)args,"Hitem");
+ if (!cId)
+ return false;
+ itemId = atol(cId);
+ }
+
+ if (itemId <200000)
+ {
+ handler->PSendSysMessage(LANG_COMMAND_RPITEMTOOLOW, itemId);
+ handler->SetSentErrorMessage(true);
+ return false;
+ }
+
+ char* ccount = strtok(NULL, " ");
+
+ int32 count = 1;
+
+ if (ccount)
+ count = strtol(ccount, NULL, 10);
+
+ if (count == 0)
+ count = 1;
+
+ Player* pl = handler->GetSession()->GetPlayer();
+
+ ItemTemplate const *pProto = sObjectMgr->GetItemTemplate(itemId);
+ if (!pProto)
+ {
+ handler->PSendSysMessage(LANG_COMMAND_RPITEMIDINVALID, itemId);
+ handler->SetSentErrorMessage(true);
+ return false;
+ }
+
+ //Subtract
+ if (count < 0)
+ {
+ pl->DestroyItemCount(itemId, -count, true, false);
+ handler->PSendSysMessage(LANG_REMOVERPITEM, itemId, -count, handler->GetNameLink(pl).c_str());
+ return true;
+ }
+
+ //Adding items
+ uint32 noSpaceForCount = 0;
+
+ // check space and find places
+ ItemPosCountVec dest;
+ uint8 msg = pl->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, itemId, count, &noSpaceForCount);
+ if (msg != EQUIP_ERR_OK) // convert to possible store amount
+ count -= noSpaceForCount;
+
+ if (count == 0 || dest.empty()) // can't add any
+ {
+ handler->PSendSysMessage(LANG_ITEM_CANNOT_CREATE, itemId, noSpaceForCount);
+ handler->SetSentErrorMessage(true);
+ return false;
+ }
+
+ Item* item = pl->StoreNewItem(dest, itemId, true, Item::GenerateItemRandomPropertyId(itemId));
+
+ if (count > 0 && item)
+ {
+ pl->SendNewItem(item,count,false,true);
+ }
+
+ if (noSpaceForCount > 0)
+ handler->PSendSysMessage(LANG_ITEM_CANNOT_CREATE, itemId, noSpaceForCount);
+
+ return true;
+ }
+
+ static bool HandleSelfScaleCommand(ChatHandler* handler, char const* args)
+ {
+ if (!*args)
+ return false;
+
+ float Scale = (float)atof((char*)args);
+ if (Scale > 1.1f || Scale < 0.9f)
+ {
+ handler->SendSysMessage(LANG_BAD_VALUE);
+ handler->SetSentErrorMessage(true);
+ return false;
+ }
+
+ QueryResult result = CharacterDatabase.PQuery("SELECT scale, scale_times_changed FROM characters_addon WHERE guid='%u'", handler->GetSession()->GetPlayer()->GetGUIDLow());
+ if(result)
+ {
+ Field* fields = result->Fetch();
+
+ float customScale = fields[0].GetFloat();
+ uint8 scaleTimesChanged = fields[1].GetUInt8();
+
+ if (scaleTimesChanged < 10)
+ {
+ Player *chr = handler->GetSession()->GetPlayer();
+ uint8 scaleChangesRemaining = (10 - (scaleTimesChanged + 1));
+ handler->PSendSysMessage(LANG_CUSTOM_SCALE_CHANGE, Scale, scaleChangesRemaining);
+ chr->SetFloatValue(OBJECT_FIELD_SCALE_X, Scale);
+
+ QueryResult result = CharacterDatabase.PQuery("UPDATE characters_addon SET scale='%f', scale_times_changed=(`scale_times_changed`+1) WHERE guid='%u'", Scale, chr->GetGUIDLow());
+
+ return true;
+ }
+
+ else
+ {
+ handler->SendSysMessage(LANG_SCALE_NO_MORE_CHANGES);
+ handler->SetSentErrorMessage(true);
+ return false;
+ }
+ }
+
+ else
+ {
+ Player *chr = handler->GetSession()->GetPlayer();
+
+ uint8 scaleChangesRemaining = 9;
+ handler->PSendSysMessage(LANG_CUSTOM_SCALE_CHANGE, Scale, scaleChangesRemaining);
+ chr->SetFloatValue(OBJECT_FIELD_SCALE_X, Scale);
+ CharacterDatabase.PExecute("INSERT INTO characters_addon(guid,scale,scale_times_changed) VALUES ('%u','%f','1')", chr->GetGUIDLow(), Scale);
+
+ return true;
+ }
+ }
+
+ static bool HandleSelfTaxiCheatCommand(ChatHandler* handler, char const* /*args*/)
+ {
+ Player* chr = handler->GetSession()->GetPlayer();
+
+ if (!chr->isTaxiCheater())
+ {
+ chr->SetTaxiCheater(true);
+ handler->PSendSysMessage(LANG_SELFTAXIS_UNL);
+
+ return true;
+ }
+ else
+ {
+ handler->SendSysMessage(LANG_SELFTAXIS_ALREADYON);
+ handler->SetSentErrorMessage(true);
+ return false;
+ }
+ }
+
+ static bool HandleSelfMorphCommand(ChatHandler* handler, char const* args)
+ {
+ if (!*args)
+ return false;
+
+ uint16 display_id = (uint16)atoi((char*)args);
+
+ Player *chr = handler->GetSession()->GetPlayer();
+
+ chr->SetDisplayId(display_id);
+ handler->PSendSysMessage(LANG_SELF_MORPH, display_id);
+
+ return true;
+ }
+
+ static bool HandleAddItemAllCommand(ChatHandler* handler, char const* args)
+ {
+ if (!*args)
+ return false;
+
+ uint32 itemId = 0;
+
+ if (args[0] == '[') // [name] manual form
+ {
+ char* citemName = strtok((char*)args, "]");
+
+ if (citemName && citemName[0])
+ {
+ std::string itemName = citemName+1;
+ WorldDatabase.EscapeString(itemName);
+
+ PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_SEL_ITEM_TEMPLATE_BY_NAME);
+ stmt->setString(0, itemName);
+ PreparedQueryResult result = WorldDatabase.Query(stmt);
+
+ if (!result)
+ {
+ handler->PSendSysMessage(LANG_COMMAND_COULDNOTFIND, citemName+1);
+ handler->SetSentErrorMessage(true);
+ return false;
+ }
+ itemId = result->Fetch()->GetUInt16();
+ }
+ else
+ return false;
+ }
+ else // item_id or [name] Shift-click form |color|Hitem:item_id:0:0:0|h[name]|h|r
+ {
+ char* cId = handler->extractKeyFromLink((char*)args, "Hitem");
+ if (!cId)
+ return false;
+ itemId = atol(cId);
+ }
+
+ char* ccount = strtok(NULL, " ");
+
+ int32 count = 1;
+
+ if (ccount)
+ count = strtol(ccount, NULL, 10);
+
+ if (count == 0)
+ count = 1;
+
+ ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(itemId);
+ if (!pProto)
+ {
+ handler->PSendSysMessage(LANG_COMMAND_ITEMIDINVALID, itemId);
+ handler->SetSentErrorMessage(true);
+ return false;
+ }
+
+ sWorld->AddItemAll(itemId, count);
+
+ //Subtract
+ if (count < 0)
+ {
+ handler->PSendSysMessage(LANG_REMOVEITEM_ALL, itemId, -count);
+ return true;
+ }
+ else
+ {
+ handler->PSendSysMessage(LANG_ADDITEM_ALL, itemId, count);
+ return true;
+ }
+
+ return true;
+ }
+
+ static bool HandlePlayLocalCommand(ChatHandler* handler, char const* args)
+ {
+ if (!*args)
+ return false;
+
+ uint32 soundId = atoi((char*)args);
+
+ if (!sSoundEntriesStore.LookupEntry(soundId))
+ {
+ handler->PSendSysMessage(LANG_SOUND_NOT_EXIST, soundId);
+ handler->SetSentErrorMessage(true);
+ return false;
+ }
+
+ WorldPacket data(SMSG_PLAY_SOUND, 4);
+ data << uint32(soundId);
+ handler->GetSession()->GetPlayer()->Player::SendMessageToSetInRange(&data, MAX_VISIBILITY_DISTANCE, true);
+
+ handler->PSendSysMessage(LANG_COMMAND_PLAYED_LOCALLY, soundId);
+ return true;
+ }
+
+ static bool HandleUnAuraAllCommand(ChatHandler* handler, char const* args)
+ {
+ std::string argstr = args;
+ if (argstr == "all")
+ {
+ sWorld->MassUnauraAll();
+ return true;
+ }
+
+ // number or [name] Shift-click form |color|Hspell:spell_id|h[name]|h|r or Htalent form
+ uint32 spellId = handler->extractSpellIdFromLink((char*)args);
+ if (!spellId)
+ return false;
+
+ sWorld->MassUnaura(spellId);
+
+ return true;
+ }
};
void AddSC_misc_commandscript()
View
2 src/server/shared/Database/Implementation/LoginDatabase.cpp
@@ -22,7 +22,7 @@ void LoginDatabaseConnection::DoPrepareStatements()
if (!m_reconnecting)
m_stmts.resize(MAX_LOGINDATABASE_STATEMENTS);
- PREPARE_STATEMENT(LOGIN_GET_REALMLIST, "SELECT id, name, address, port, icon, color, timezone, allowedSecurityLevel, population, gamebuild FROM realmlist WHERE color <> 3 ORDER BY name", CONNECTION_SYNCH)
+ PREPARE_STATEMENT(LOGIN_GET_REALMLIST, "SELECT id, name, address, port, icon, flag, timezone, allowedSecurityLevel, population, gamebuild FROM realmlist WHERE flag <> 3 ORDER BY name", CONNECTION_SYNCH)
PREPARE_STATEMENT(LOGIN_SET_EXPIREDIPBANS, "DELETE FROM ip_banned WHERE unbandate<>bandate AND unbandate<=UNIX_TIMESTAMP()", CONNECTION_ASYNC)
PREPARE_STATEMENT(LOGIN_SET_EXPIREDACCBANS, "UPDATE account_banned SET active = 0 WHERE active = 1 AND unbandate<>bandate AND unbandate<=UNIX_TIMESTAMP()", CONNECTION_ASYNC)
PREPARE_STATEMENT(LOGIN_GET_IPBANNED, "SELECT * FROM ip_banned WHERE ip = ?", CONNECTION_SYNCH)
View
6 src/server/worldserver/Master.cpp
@@ -152,7 +152,7 @@ int Master::Run()
return 1;
// Set server offline (not connectable)
- LoginDatabase.DirectPExecute("UPDATE realmlist SET color = (color & ~%u) | %u WHERE id = '%d'", REALM_FLAG_OFFLINE, REALM_FLAG_INVALID, realmID);
+ LoginDatabase.DirectPExecute("UPDATE realmlist SET flag = (flag & ~%u) | %u WHERE id = '%d'", REALM_FLAG_OFFLINE, REALM_FLAG_INVALID, realmID);
///- Initialize the World
sWorld->SetInitialWorldSettings();
@@ -262,7 +262,7 @@ int Master::Run()
}
// Set server online (allow connecting now)
- LoginDatabase.DirectPExecute("UPDATE realmlist SET color = color & ~%u, population = 0 WHERE id = '%u'", REALM_FLAG_INVALID, realmID);
+ LoginDatabase.DirectPExecute("UPDATE realmlist SET flag = flag & ~%u, population = 0 WHERE id = '%u'", REALM_FLAG_INVALID, realmID);
sLog->outString("%s (worldserver-daemon) ready...", _FULLVERSION);
@@ -279,7 +279,7 @@ int Master::Run()
}
// Set server offline
- LoginDatabase.DirectPExecute("UPDATE realmlist SET color = color | %u WHERE id = '%d'", REALM_FLAG_OFFLINE, realmID);
+ LoginDatabase.DirectPExecute("UPDATE realmlist SET flag = flag | %u WHERE id = '%d'", REALM_FLAG_OFFLINE, realmID);
///- Clean database before leaving
ClearOnlineAccounts();

No commit comments for this range

Something went wrong with that request. Please try again.