Jump to content

Unik2psc

Members
  • Posts

    29
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by Unik2psc

  1. What bug does the patch fix? What features does the patch add? Delete characters from friend list when friend are online. For which repository revision was the patch created? MaNGOS/master Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread. If We deleted character and our friends are online. Our friends will have "non existing" in friends list. Who has been writing this patch? Please include either forum user names or email addresses. Emtec on github. Link to patch https://gist.github.com/738573 Need test. I'll update my server tommorow (sorry)
  2. 1. Player *pPlayer = m_session->GetPlayer(); change to if(Player *pPlayer = m_session->GetPlayer(). Security. 2. Where your code is ?. (function name, file).
  3. New patch (by Kero): https://gist.github.com/725939 You've lost these lines: Regards
  4. Kerto, this patch is full patch or patch for mod ace mtmaps ?
  5. git clone -b mangos-0.12 git://github.com/mangos/mangos.git folder(/example:mangosTbc)
  6. Unik2psc

    MMaps Redux

    compilation error: ACE libary external. ( --with-debug-info --disable-builtin-ace). --- Edit: Maybe ?
  7. Mangos revision: 10206 Link to patch: http://gist.github.com/489162 Description: Add options "send mail". There are some quest of this type. Example - quest DK - http://www.wowhead.com/quest=12711 UPDATE quest_template SET WHERE StartScript = '', CompleteScript = '12711' entry = 12711; DELETE FROM `quest_end_scripts` WHERE id = `12711`; INSERT INTO `quest_end_scripts` VALUES(12711, 0, 20, 1, 3, 27760, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `mail_template` (`id`, `title`, `text`, `item1`, `item1_count`, `item2`, `item2_count`, `item3`, `item3_count`, `item4`, `item4_count`, `item5`, `item5_count`) VALUES (1, 'News From The North', 'attachment below', 39317, 1, 0, 0, 0, 0, 0, 0, 0, 0); *_scripts type 20: * @datalong - mail_id * @datalong2 (3 - CREATURE, 4 - OBJECT) * @datalogn3 datalong2_guid or entry Github account: Emtec It work
  8. http://gist.github.com/471587 Insider44(3.3.5)[mangos rev: 10176] + vehicle patch and diff --git a/src/game/Object.cpp b/src/game/Object.cpp index 32a60fd..6717860 100644 --- a/src/game/Object.cpp +++ b/src/game/Object.cpp @@ -1694,7 +1694,7 @@ Vehicle* WorldObject::SummonVehicle(uint32 id, float x, float y, float z, float } if (x == 0.0f && y == 0.0f && z == 0.0f) - GetClosePoint(x, y, z, v->GetObjectSize()); + GetClosePoint(x, y, z, v->GetObjectBoundingRadius()); v->Relocate(x, y, z, ang); diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index ec13a6f..42f89bf 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -10325,9 +10325,9 @@ void Unit::EnterVehicle(Vehicle *vehicle, int8 seat_id, bool force) return; m_movementInfo.SetTransportData(v->GetGUID(), - (veSeat->m_attachmentOffsetX + v->GetObjectSize()) * GetFloatValue(OBJECT_FIELD_SCALE_X), - (veSeat->m_attachmentOffsetY + v->GetObjectSize()) * GetFloatValue(OBJECT_FIELD_SCALE_X), - (veSeat->m_attachmentOffsetZ + v->GetObjectSize()) * GetFloatValue(OBJECT_FIELD_SCALE_X), + (veSeat->m_attachmentOffsetX + v->GetObjectBoundingRadius()) * GetFloatValue(OBJECT_FIELD_SCALE_X), + (veSeat->m_attachmentOffsetY + v->GetObjectBoundingRadius()) * GetFloatValue(OBJECT_FIELD_SCALE_X), + (veSeat->m_attachmentOffsetZ + v->GetObjectBoundingRadius()) * GetFloatValue(OBJECT_FIELD_SCALE_X), veSeat->m_passengerYaw, v->GetCreationTime(), seat_id, veSeat->m_ID, sObjectMgr.GetSeatFlags(veSeat->m_ID), v->GetVehicleFlags()); @@ -10380,7 +10380,7 @@ void Unit::ExitVehicle() vehicle->SetSpawnDuration(1); } } - v_size = vehicle->GetObjectSize(); + v_size = vehicle->GetObjectBoundingRadius(); vehicle->RemovePassenger(this); } SetVehicleGUID(0); diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index eae5df1..925710e 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -3594,8 +3594,8 @@ void Aura::HandleAuraModStun(bool apply, bool Real) ((Player*)target)->m_movementInfo.SetMovementFlags(MOVEFLAG_NONE); target->SetStandState(UNIT_STAND_STATE_STAND);// in 1.5 client } - - if(!m_target->hasUnitState(UNIT_STAT_ON_VEHICLE)) + + if(!target->hasUnitState(UNIT_STAT_ON_VEHICLE)) { WorldPacket data(SMSG_FORCE_MOVE_ROOT, 8); data << target->GetPackGUID();
  9. Confirm on rev. 10154 Just one player began to bg and
  10. This is good news I try write this code for 2 days - but, I used FindMap. It was my mistake.Very very thank man !!!
  11. LordJZ - We do not understand. I do not mean - if someone can come or not. Because it works well. I mean the active column. I mean the active column. Mangos has to change status to active to 0 ( when all in-active ban). I do not have any errors. Maybe I wrote wrong in the beginning. But in this code there is nothing wrong. I changed what was already in the code. // cleanup query //set expired bans to inactive loginDatabase.Execute("UPDATE account_banned SET active = 0 WHERE unbandate<=UNIX_TIMESTAMP() AND unbandate<>bandate"); loginDatabase.Execute("DELETE FROM ip_banned WHERE unbandate<=UNIX_TIMESTAMP() AND unbandate<>bandate"); this is default code (startup realmd). If you apply patch it is run from time to time. (chang column active to 0 - not we can connect to server). So do not say that something is wrong. Because query has not changed. Only be carried out from time to time. Query for web should be written based on the active column.Mangos decided that bans are not important. Sorry if you don't understand me. Mayby, I should write "not remove bans, and changing the column active". You know. I know - that i can build the web query with dates. But - when something is this column is "active". A simple query on the side and behind. I realizes - that can be otherwise. But why.
  12. LordJZ. Yes you are right. Player login > check ban > deactive ban per player.For me I noticed that it was not really working well. My code doesn't delete ban per player (when he logs on). This code does delete all in-active ban (it needn't player logs on) - form time to time (AccountBanUpdateDelay). This is my solution. This allows me to maintain order in the list ban. /// Remove a ban from an account or IP address bool World::RemoveBanAccount(BanMode mode, std::string nameOrIP) { if (mode == BAN_IP) { loginDatabase.escape_string(nameOrIP); loginDatabase.PExecute("DELETE FROM ip_banned WHERE ip = '%s'",nameOrIP.c_str()); } else { uint32 account = 0; if (mode == BAN_ACCOUNT) account = sAccountMgr.GetId (nameOrIP); else if (mode == BAN_CHARACTER) account = sObjectMgr.GetPlayerAccountIdByPlayerName (nameOrIP); if (!account) return false; //NO SQL injection as account is uint32 loginDatabase.PExecute("UPDATE account_banned SET active = '0' WHERE id = '%u'",account); } it need player logs on. (mangosd) - it doesn't delete ban when player not logs on Realmd - only that I changed (when Server startup ) // cleanup query //set expired bans to inactive loginDatabase.Execute("UPDATE account_banned SET active = 0 WHERE unbandate<=UNIX_TIMESTAMP() AND unbandate<>bandate"); loginDatabase.Execute("DELETE FROM ip_banned WHERE unbandate<=UNIX_TIMESTAMP() AND unbandate<>bandate"); It work when startup server. AuthSocket.cpp ///- If the account is banned, reject the logon attempt QueryResult *banresult = loginDatabase.PQuery("SELECT bandate,unbandate FROM account_banned WHERE " "id = %u AND active = 1 AND (unbandate > UNIX_TIMESTAMP() OR unbandate = bandate)", (*result)[1].GetUInt32()); if(banresult) This only used select query. Not update & delete query. Patch is not bad. Because I changed what it was. Server does delete all ban when we turn on server, now - for time to time.
  13. The server is deleting bans only when he is launching, he isn't doing it when he is already running in the meantime. I've changed that ( I have seen it as a must ). A player recently wrote to me that 2 days ago his ban was still present and was not removed
  14. Currently bans are removed when we turn on server. During action server bans are not removed. I tried to correct it. Now - ban are removed when running server diff --git a/src/realmd/Main.cpp b/src/realmd/Main.cpp index f019e6d..0d4686e 100644 --- a/src/realmd/Main.cpp +++ b/src/realmd/Main.cpp @@ -57,6 +57,9 @@ void HookSignals(); bool stopEvent = false; ///< Setting it to true stops the server +uint32 m_AccountBanDelay = 0; +time_t m_AccountBanNext = time(NULL); + DatabaseType loginDatabase; ///< Accessor to the realm server database /// Print out the usage string for this program on the console. @@ -210,10 +213,8 @@ extern int main(int argc, char **argv) return 1; } - // cleanup query - //set expired bans to inactive - loginDatabase.Execute("UPDATE account_banned SET active = 0 WHERE unbandate<=UNIX_TIMESTAMP() AND unbandate<>bandate"); - loginDatabase.Execute("DELETE FROM ip_banned WHERE unbandate<=UNIX_TIMESTAMP() AND unbandate<>bandate"); + m_AccountBanDelay = sConfig.GetIntDefault( "AccountBanUpdateDelay", 20); + m_AccountBanNext = time(NULL) + m_AccountBanDelay; h.Add(&authListenSocket); @@ -270,6 +271,14 @@ extern int main(int argc, char **argv) ///- Wait for termination signal while (!stopEvent) { + + if(m_AccountBanDelay > 0 && m_AccountBanNext < time(NULL)){ + sLog.outDetail("Delete old account ban..."); + loginDatabase.Execute("UPDATE account_banned SET active = 0 WHERE unbandate<=UNIX_TIMESTAMP() AND unbandate<>bandate"); + loginDatabase.Execute("DELETE FROM ip_banned WHERE unbandate<=UNIX_TIMESTAMP() AND unbandate<>bandate"); + + m_AccountBanNext = time(NULL) + m_AccountBanDelay; + } h.Select(0, 100000); diff --git a/src/realmd/realmd.conf.dist.in b/src/realmd/realmd.conf.dist.in index 66335b7..04c88b9 100644 --- a/src/realmd/realmd.conf.dist.in +++ b/src/realmd/realmd.conf.dist.in @@ -81,6 +81,12 @@ ConfVersion=2007062001 # Default: 20 # 0 (Disabled) # +# AccountBanUpdateDelay +# Updating ban (exclusion is not active ban) +# Default: 20 +# 0 (Disabled) +# +# # WrongPass.MaxCount # Number of login attemps with wrong password before the account or IP is banned # Default: 0 (Never ban) @@ -111,6 +117,7 @@ LogColors = "" UseProcessors = 0 ProcessPriority = 1 RealmsStateUpdateDelay = 20 +AccountBanUpdateDelay = 20 WrongPass.MaxCount = 0 WrongPass.BanTime = 600 WrongPass.BanType = 0 I tested it. Code is working good. (Github username: Emtec)
  15. It is wrong solution. + ACE_Thread_Mutex m_spellUpdateLock; How much is a instance class World ? = 1. Then we take the mutex. How many units? - Each player, vehicle, npc. Each update get mutex, in that time others threads is waiting for the queue. This creates a "bottleneck." How many maps is the npc? - 1. Why update was to be made from more than one thread? Solutions must be sought - mutexs are not needed. If two threads at once the update (), the problem lies elsewhere. Mutexs do not fix it. (Sorry for my english)
  16. you have used command make install ?
  17. Debian need /usr/lib/ ls -s /path/to_ace/libACE-5.7.6.so /usr/lib/libACE-5.7.6.so expamle.
  18. lo, i'm stupid how could I forget: ( one big thanks KERO how to (for debian): and and http://pastebin.com/f66c0e16a
  19. /usr/bin/ld: cannot find -ltbb collect2: ld returned 1 exit status make[3]: *** [mangos-realmd] Error 1 make[3]: Leaving directory `/home/test/objdir/src/realmd' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/test/objdir/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/test/objdir' make: *** [all] Error 2
  20. Yeap, I know, always do the changes in makefile Not need, my makefile = mangos + sd2 generally have fun. On one thread I have compilation errors . Live not to die: D http://pastebin.com/f33718ead
  21. Kero - you have compilation errors when compiled tbb in threads?
  22. During compilation, I have the same errors Ubuntu = debian + packet I have 2x disks hardware 500GB + raid 0 + hardware controller raid system file: ext3
×
×
  • 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