Jump to content

Marik

Members
  • Posts

    28
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Marik's Achievements

Member

Member (2/3)

0

Reputation

  1. Hi, my mangos server is running on an debian 64-bit dedicated server. To start my process I use this script: #!/bin/sh screen -dmS mangos-worldd-restarter ./restarter_debug_bin.sh screen -dmS mangos-realmd ./mangos-realmd Which calles: #!/bin/sh ############### # About: Auto restart mangos-worldd on crash & generate crash report into crash_log_(DATE_TIME).log ############### # 1. Compile MaNGOS with parameter: --with-debug-info # 2. Put auto_restarter.sh into compiled mangos directory (where folders: bin/, lib/, etc/) # 3. (Only once): chmod +x auto_restarter.sh # 4. Usage: ./auto_restarter.sh -c etc/mangosd.conf # p.s. Make sure you have "gdb" installed. ############### # config: # path to mangos-worldd binary daemon=./mangos-worldd # system export LD_LIBRARY_PATH=.:lib:$LD_LIBRARY_PATH if [ "`ulimit -c`" -eq 0 ]; then ulimit -c unlimited fi while true do MANGOS=`ps -el | grep mangos-worldd` $daemon $* if [ -z "$MANGOS" ]; then dte=`date +%F_%H-%M-%S` gdb $daemon core.* --batch --eval-command="bt ful" > ../logs/crash/crash_log_$dte.log mv crash_log_$dte.log gdb/crash_log_$dte.log mv log/Server.log dc/Server-$dte.log gzip dc/*.log --best rm core.* fi sleep 5 done Anyway, this was pretty nice untill i reinstalled my server (the whole debian server, not just mangos ). Now I get with every crash an 0 Byte Crashlog. First, I thought it was because of missing rights, but I granted the logs folder all rights. Notice that the process creates the crashlogs corectly, but does not write anything to the file. drwxrwxrwx 4 root root 4096 12. Dez 10:46 logs Does somebody has an idea? Thanks in advice Marik
  2. Yes, this is really frustrating. I thought about reviving in three (or so) sequential frames. What do you think about this? Marik
  3. I remember we had (or still have) a similar bug on our server. The user told me, that if someone equipp more than 3 of these special gems, their wow crashes. How many gems did you equip? Marik
  4. That would be very nice. I've tried the patch on the last revision, but there are way to many conflicts Marik
  5. That was a joke. Anyway, now it works properly again. Thanks
  6. An error was encountered Error: Page Not found (Error 404): The requested page /wiki/ could not be found.. --- Maybe you've deleted too much
  7. I'am now using rsa patch (https://github.com/rsa/mangos/commit/e8b1a653d07801fdfea81de2e0352594fefea5fd). Untill now it works fine. I can summon totems everywhere (also in instances) and in a first test my scriptdev2 script doesn't crash. Further tests will be needed, but for now it looks pretty nice. Maybe we can apply this patch @ Mangos?
  8. Hi Folks, I've investigated my Problem. Pls correct me, if i am wrong. #if PLATFORM == PLATFORM_WINDOWS inline uint32 getMSTime() { return GetTickCount(); } #else inline uint32 getMSTime() { struct timeval tv; struct timezone tz; gettimeofday( &tv, &tz ); return (tv.tv_sec * 1000) + (tv.tv_usec / 1000); } #endif Let's start with windows. It is called the GetTickCount() method from the WinAPI. (http://msdn.microsoft.com/en-us/library/ms724408(VS.85).aspx) So in the case of my windows computer the Value was in the test something like 5000 0000 --> apr. 5000 seconds --> 83 minutes. 5000 0000 is a relative small number and fits in a unit32 without problems. So now Linux. gettimeofday( &tv, &tz ); return (tv.tv_sec * 1000) + (tv.tv_usec / 1000); gettimeofday( &tv, &tz ); Calculates the seconds (and milliseconds) from the 1.1.1970. Let's Calculate. Appr. more than 40 Years = 40 * 365 days * 24 hour * 3600 seconds = 1.261.440.000 Ok this wouldn't overflow an uint32 (2^32 = 0-4.294.967.295) But you return: return (tv.tv_sec * 1000) + (tv.tv_usec / 1000); Ok, it makes sense, because we want the milliseconds, but now it ist 1.261.440.000 * 1.000 = 1.261.440.000.000 what definitively overflows the uint32 (2^32 = 0-4.294.967.295). The result from getMSTime() is used for the Updates in the world since this commit. That's new. Why I am telling you? I just want my totems back @ linux I don't now whether I am right. And even if all the points, I mentioned are correct, I do not know how it could falsify the system. I mean, so what? the milliseconds overflows the data bounds, but there would be some kind of modulo operation. Timeimillisec % 2^32, would'n it? The easiest way, would be, that some please test this commit @ a platform which is not windows. Thus, nobody seams to have my totem Problem, I think all my considerations are void Anyway, Good night Everybody! Marik Small Addition: With this Commit I had very weird crashes in some scripts. In one script its crashed at three different Codelines (Play sound A, Play sound B, change flag --> Easy stuff). Before this commit I haven't got problems with this crash. And now, I am on one Commit before this, I've tested the same script and no crashes. I don't now whether it is all linked together, but it is problably.
  9. On my debian Server anywhere. EDIT: Does anybody has also problems to summon totems on a linux distribution? Otherwise I would invest more time, to check, whether it is my fault. But as I said, the same Commit does work at windows properly.
  10. Unfortunately I cannot summon any totems anymore with this commit @ my dedicated debian server. On Windows everything works fine. RSA, mentioned some doubts in a comment @ Github. Greetz Marik
  11. I assumed that. First Char bought the Item, because this char has enough reputation. Second Char is at level 80, but have not enough reputation. Now i thought, the fix, solves this Problem. I mean, that my second character can use (enchant) the item despite of his missing reputation. Where is my error in reasoning? By the way: I dont now why Blizzard has exactly two items of one enchant. Maybe the item which is sold, is the one with the reputation. And after sending the item via mail, or even earlier, after you buy it, it will transform to the item without reputation. That would make sense.
  12. Hm. The Item, you have postet, has no reputation requirements. If I let a NPC sell it, every player (doesn't matter if he has a char with needed reputation) can buy this item. Am I wrong?
  13. Hi, how it is supposed to work? I've pulled the current Mangos version and bought me with a char http://www.wowhead.com/item=50335 (this char has max reputation). The Sending to another char (reputation hatefull) on my account works, but the reputation font is still read and right klick on the item tells me, that i cannot use this item. Is there some kind of flag, I've forgotten to set @ Database? Thanks in Advice Marik
  14. diff --git a/src/game/Item.h b/src/game/Item.h index 6b87604..b470564 100644 --- a/src/game/Item.h +++ b/src/game/Item.h @@ -359,6 +359,7 @@ class MANGOS_DLL_SPEC Item : public Object void SetLootState(ItemLootUpdateState state); bool HasGeneratedLoot() const { return m_lootState != ITEM_LOOT_NONE && m_lootState != ITEM_LOOT_REMOVED; } bool HasSavedLoot() const { return m_lootState != ITEM_LOOT_NONE && m_lootState != ITEM_LOOT_NEW && m_lootState != ITEM_LOOT_TEMPORARY; } + bool IsTemporaryLoot() const { return m_lootState == ITEM_LOOT_TEMPORARY; } // Update States ItemUpdateState GetState() const { return uState; } diff --git a/src/game/LootHandler.cpp b/src/game/LootHandler.cpp diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 1daeabd..c92bf9f 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -7900,7 +7900,7 @@ void Player::SendLoot(ObjectGuid guid, LootType loot_type) loot = &item->loot; - if (!item->HasGeneratedLoot()) + if (!item->HasGeneratedLoot() || item->IsTemporaryLoot()) { item->loot.clear(); That would fix the problem. I've tested it. Whether it is good code style, you have to decide. Maybe you prefer to combinte this two method calls to one new: !item->HasGeneratedLoot() || item->IsTemporaryLoot() Thats implementation details. I hope, I could help. Marik
  15. I think the problem lies in hier: if (!item->HasGeneratedLoot()) { item->loot.clear(); switch(loot_type) { case LOOT_DISENCHANTING: loot->FillLoot(item->GetProto()->DisenchantID, LootTemplates_Disenchant, this,true); item->SetLootState(ITEM_LOOT_TEMPORARY); break; case LOOT_PROSPECTING: loot->FillLoot(item->GetEntry(), LootTemplates_Prospecting, this,true); item->SetLootState(ITEM_LOOT_TEMPORARY); break; case LOOT_MILLING: loot->FillLoot(item->GetEntry(), LootTemplates_Milling, this,true); item->SetLootState(ITEM_LOOT_TEMPORARY); break; default: loot->FillLoot(item->GetEntry(), LootTemplates_Item, this,true); loot->generateMoneyLoot(item->GetProto()->MinMoneyLoot,item->GetProto()->MaxMoneyLoot); item->SetLootState(ITEM_LOOT_CHANGED); break; } } break; } In the first round u can fullfill if (!item->HasGeneratedLoot()). But then you set item->SetLootState(ITEM_LOOT_TEMPORARY); Now item->HasGeneratedLoot() returns true and if (!item->HasGeneratedLoot()) is false. Therefore the programm does not acces the above code and does not create the new loot. Greetz Marik
×
×
  • 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