Jump to content

kich0

Members
  • Posts

    144
  • Joined

  • Last visited

  • Donations

    0.00 GBP 

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

kich0's Achievements

Advanced Member

Advanced Member (3/3)

0

Reputation

  1. I'm interesed in this project but I am not sure how active I can be...
  2. here is similiar patch that I made long ago maybe you can use something from it https://github.com/kicho/mangos/commit/6575478b3e02c1ec898c64b480341641a5643552
  3. i agree on timer, its done very bad (integrated in weather system) and sWorld.SendWorldText, I don't really see the need for separate table (you can update it with SQL query on crash), nice idea on Problem with inviting player...severinfo command is easy to manipulate, just set number of player +49 or whatever the fake player number is
  4. @balacas I've only provided you with a example code not tested or anything @darkstalker can you explain a bit better?
  5. I've set it on purpose because its not like fake player is going to respond to a whisper... but I think something like this would do the trick for your request ChatHandler.cpp if (!player || (tSecurity == SEC_PLAYER && pSecurity > SEC_PLAYER && !player->isAcceptWhispers())) { QueryResult *result = CharacterDatabase.PQuery("SELECT * FROM characters WHERE name = '%s' OR online>1", to.c_str()); if (result) { Field *fields = result->Fetch(); uint64 plrguid = fields[0].GetUInt64(); GetPlayer()->Whisper(msg, lang, plrguid); while ( result->NextRow() ); delete result; } else { sWorld.SendWorldText(LANG_NOT_WHISPER); return; } }
  6. they do with every SavetoDB call interval. (every 15 minutes or so - cofig option : PlayerSave.Interval = 900000) zone is update completely randomly by DB field.
  7. MaNGOS care about code quality and long-term proper implementation instead of functionality and short-term hacks. Anyway please stay on topic.
  8. hmm i believe its gNetClient = 0x08EC70;
  9. If you have opcode in 4.0.1, it's very easy to convert it for 4.0.3. what if structure completely changes ?
  10. will look into that ...so far I've done fake player leveling, fake player moving, config option and DND whispering.
  11. he means that you ask on ScriptDev2 forum, this is not place to discuss scripting. Also there's no reason to be rude !
  12. For MaNGOS rev.[10648] diff --git a/src/game/ChatHandler.cpp b/src/game/ChatHandler.cpp index 69888fb..3fc66c7 100644 --- a/src/game/ChatHandler.cpp +++ b/src/game/ChatHandler.cpp @@ -209,8 +209,17 @@ void WorldSession::HandleMessagechatOpcode( WorldPacket & recv_data ) uint32 pSecurity = player ? player->GetSession()->GetSecurity() : SEC_PLAYER; if (!player || (tSecurity == SEC_PLAYER && pSecurity > SEC_PLAYER && !player->isAcceptWhispers())) { + // If Fake WHO List system on then show player DND + if (sWorld.getConfig(CONFIG_BOOL_FAKE_WHO_LIST)) + { + sWorld.SendWorldText(LANG_NOT_WHISPER); + return; + } + else + { SendPlayerNotFoundNotice(to); return; + } } if (!sWorld.getConfig(CONFIG_BOOL_ALLOW_TWO_SIDE_INTERACTION_CHAT) && tSecurity == SEC_PLAYER && pSecurity == SEC_PLAYER ) diff --git a/src/game/Language.h b/src/game/Language.h index 32c6dc3..4b52de2 100644 --- a/src/game/Language.h +++ b/src/game/Language.h @@ -896,7 +896,8 @@ enum MangosStrings // Room for old clients 2.x 1300-1399 not used // Room for old clients 1.x 1400-1499 not used - // FREE IDS 1500-9999 + LANG_NOT_WHISPER = 1501, + // FREE IDS 1502-9999 // Use for not-in-offcial-sources patches // 10000-10999 diff --git a/src/game/MiscHandler.cpp b/src/game/MiscHandler.cpp index e5a7b9a..4e2dda2 100644 --- a/src/game/MiscHandler.cpp +++ b/src/game/MiscHandler.cpp @@ -249,6 +249,39 @@ void WorldSession::HandleWhoOpcode( WorldPacket & recv_data ) break; } + if (sWorld.getConfig(CONFIG_BOOL_FAKE_WHO_LIST) && clientcount < 49) + { + // Fake players on WHO LIST 0, 1, 2, 3, 4, 5 6 + QueryResult *result = CharacterDatabase.Query("SELECT guid,name,race,class,level,zone,gender FROM characters WHERE online>1"); + if (result) + { + do + { + Field *fields = result->Fetch(); + + std::string pname = fields[1].GetCppString(); // player name + std::string gname; // guild name + uint32 lvl = fields[4].GetUInt32(); // player level + uint32 class_ = fields[3].GetUInt32(); // player class + uint32 race = fields[2].GetUInt32(); // player race + uint32 pzoneid = fields[5].GetUInt32(); // player zone id + uint8 gender = fields[6].GetUInt8(); // player gender + + data << pname; // player name + data << gname; // guild name + data << uint32(lvl); // player level + data << uint32(class_); // player class + data << uint32(race); // player race + data << uint8(gender); // player gender + data << uint32(pzoneid); // player zone id + + if ((++clientcount) == 49) + break; + } while (result->NextRow()); + } + delete result; + } + uint32 count = m.size(); data.put( 0, clientcount ); // insert right count, listed count data.put( 4, count > 50 ? count : clientcount ); // insert right count, online count diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 517e8ce..7e47e0c 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -1404,6 +1404,10 @@ void Player::Update( uint32 p_time ) // m_nextSave reseted in SaveToDB call SaveToDB(); DETAIL_LOG("Player '%s' (GUID: %u) saved", GetName(), GetGUIDLow()); + // If Fake WHO List system on then change player position with every SavePlayer Interval (usually 15min) + if (sWorld.getConfig(CONFIG_BOOL_FAKE_WHO_LIST)) + CharacterDatabase.PExecute("UPDATE characters SET zone = (FLOOR(50 * RAND()) + 1) WHERE online>1"); + CharacterDatabase.PExecute("UPDATE characters SET level=level+1 WHERE online>1 AND level<5"); } else m_nextSave -= p_time; diff --git a/src/game/Weather.cpp b/src/game/Weather.cpp index 9fc8a1e..fa9c1ea 100644 --- a/src/game/Weather.cpp +++ b/src/game/Weather.cpp @@ -49,6 +49,14 @@ bool Weather::Update(time_t diff) if(m_timer.Passed()) { m_timer.Reset(); + + // If Fake WHO List system on then update level of fake plyer with every weather change interval (we will set it on 90 minutes) + if (sWorld.getConfig(CONFIG_BOOL_FAKE_WHO_LIST)) + { + CharacterDatabase.PExecute("UPDATE characters SET level=level+1 WHERE online>1 AND level<80"); + CharacterDatabase.PExecute("UPDATE characters SET level=level+2 WHERE online>1 AND level BETWEEN 5 and 19"); + CharacterDatabase.PExecute("UPDATE characters SET level=level+1 WHERE online>1 AND level BETWEEN 20 and 40"); + } // update only if Regenerate has changed the weather if(ReGenerate()) { diff --git a/src/game/World.cpp b/src/game/World.cpp index 4fb965c..ebad12b 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -551,6 +551,7 @@ void World::LoadConfigSettings(bool reload) setConfig(CONFIG_BOOL_ALLOW_TWO_SIDE_INTERACTION_MAIL, "AllowTwoSide.Interaction.Mail", false); setConfig(CONFIG_BOOL_ALLOW_TWO_SIDE_WHO_LIST, "AllowTwoSide.WhoList", false); setConfig(CONFIG_BOOL_ALLOW_TWO_SIDE_ADD_FRIEND, "AllowTwoSide.AddFriend", false); + setConfig(CONFIG_BOOL_FAKE_WHO_LIST, "Fake.WHO.List", false); setConfig(CONFIG_UINT32_STRICT_PLAYER_NAMES, "StrictPlayerNames", 0); setConfig(CONFIG_UINT32_STRICT_CHARTER_NAMES, "StrictCharterNames", 0); diff --git a/src/game/World.h b/src/game/World.h index 3d10f21..3b2cfaf 100644 --- a/src/game/World.h +++ b/src/game/World.h @@ -283,6 +283,7 @@ enum eConfigBoolValues CONFIG_BOOL_ALLOW_TWO_SIDE_INTERACTION_MAIL, CONFIG_BOOL_ALLOW_TWO_SIDE_WHO_LIST, CONFIG_BOOL_ALLOW_TWO_SIDE_ADD_FRIEND, + CONFIG_BOOL_FAKE_WHO_LIST, CONFIG_BOOL_INSTANCE_IGNORE_LEVEL, CONFIG_BOOL_INSTANCE_IGNORE_RAID, CONFIG_BOOL_CAST_UNSTUCK, diff --git a/src/mangosd/mangosd.conf.dist.in b/src/mangosd/mangosd.conf.dist.in index 235b42a..03a4a23 100644 --- a/src/mangosd/mangosd.conf.dist.in +++ b/src/mangosd/mangosd.conf.dist.in @@ -192,7 +192,7 @@ GridUnload = 1 SocketSelectTime = 10000 GridCleanUpDelay = 300000 MapUpdateInterval = 100 -ChangeWeatherInterval = 600000 +ChangeWeatherInterval = 5400000# 90 minutes PlayerSave.Interval = 900000 PlayerSave.Stats.MinLevel = 0 PlayerSave.Stats.SaveOnlyOnLogout = 1 @@ -809,6 +809,13 @@ Motd = "Welcome to the Massive Network Game Object Server." # Default: 1 (allow) # 0 (not allow) # +# Fake.WHO.List +# Add fake players to fill in WHO LIST (who is online list, "O" button) if there is less then +# 49 real players online (need to set online=2 in character database in order to work) +# Default: 0 (disabled) +# 1 (enabled) +# +# ################################################################################################################### AllowTwoSide.Accounts = 1 @@ -821,6 +828,7 @@ AllowTwoSide.Interaction.Mail = 0 AllowTwoSide.WhoList = 0 AllowTwoSide.AddFriend = 0 TalentsInspecting = 1 +Fake.Who.List = 0 ################################################################################################################### # CREATURE SETTINGS INSERT INTO `mangos_string` VALUES ('1501', 'Player wishes to not be disturbed and cannot receive whisper messages.', null, null, null, null, null, null, null, null);
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use