Jump to content

ckegg

Members
  • Posts

    58
  • Joined

  • Last visited

  • Donations

    0.00 GBP 

Everything posted by ckegg

  1. just take out .GetRawValue() from that line
  2. I am surprised there are so many version of my script and none of them fixed critical bugs
  3. -- nevermind VladimirMangos fixed problem on 10831
  4. I don't know if you didn't read my posting or what, if you know a better way please feel free to rewrite it. There was a previous version that I use GO info stored in mangos but while in the half way I realized my server was a small server so I just did use database method for time save.
  5. If you don't mind you can use this hack code to prevent blinking through door that I wrote for my server. It is not recommended for large server because it fetches SQL for object information. If someone can improve this or have better idea feel free to rewrite it. * this is only half of the code, the minus(deleting) code shouldn't be removed because it is part of my other code, just take a look on the adding parts * diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 95e6580..85e3867 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -4302,24 +4302,43 @@ SpellCastResult Spell::CheckCast(bool strict) case SPELL_EFFECT_LEAP: case SPELL_EFFECT_TELEPORT_UNITS_FACE_CASTER: { - float dis = GetSpellRadius(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[i])); - float fx = m_caster->GetPositionX() + dis * cos(m_caster->GetOrientation()); - float fy = m_caster->GetPositionY() + dis * sin(m_caster->GetOrientation()); - // teleport a bit above terrain level to avoid falling below it - float fz = m_caster->GetBaseMap()->GetHeight(fx, fy, m_caster->GetPositionZ(), true); - if(fz <= INVALID_HEIGHT) // note: this also will prevent use effect in instances without vmaps height enabled - return SPELL_FAILED_TRY_AGAIN; - - float caster_pos_z = m_caster->GetPositionZ(); - // Control the caster to not climb or drop when +-fz > 8 - if(!(fz <= caster_pos_z + 8 && fz >= caster_pos_z - 8)) - return SPELL_FAILED_TRY_AGAIN; - // not allow use this effect at battleground until battleground start if(m_caster->GetTypeId() == TYPEID_PLAYER) if(BattleGround const *bg = ((Player*)m_caster)->GetBattleGround()) if(bg->GetStatus() != STATUS_IN_PROGRESS) return SPELL_FAILED_TRY_AGAIN; + + //check door + bool findDoor = false; + float dis = GetSpellRadius(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[i])); + + QueryResult *result = WorldDatabase.PQuery("SELECT id, " + "(POW(position_x - '%f', 2) + POW(position_y - '%f', 2) + POW(position_z - '%f', 2)) AS order_ " + "FROM gameobject WHERE map='%u' AND (POW(position_x - '%f', 2) + POW(position_y - '%f', 2) + POW(position_z - '%f', 2)) <= '%f' ORDER BY order_", + m_caster->GetPositionX(), m_caster->GetPositionY(), m_caster->GetPositionZ(), + m_caster->GetMapId(),m_caster->GetPositionX(), m_caster->GetPositionY(), m_caster->GetPositionZ(), dis*dis+5); + + if (result) + { + do + { + Field *fields = result->Fetch(); + uint32 entry = fields[0].GetUInt32(); + + GameObjectInfo const * pDoor = sObjectMgr.GetGameObjectInfo(entry); + + if(!pDoor) + continue; + + if ( pDoor->type == GAMEOBJECT_TYPE_DOOR ) + findDoor = true; + + } while (result->NextRow()); + delete result; + } + if ( findDoor ) + return SPELL_FAILED_TRY_AGAIN; + break; } case SPELL_EFFECT_STEAL_BENEFICIAL_BUFF:
  6. Mangos Version: 10479 [problem begins around 1042x] Custom Patches: none SD2 Version: none Database Name and Version : YTDB 563 How it SHOULD work: Display correct locale text in game How it DOES work: Now it is only displaying english (name from template), localization is not working. Last test: 2010-09-12 18:02:39 >> Loaded 15841 gameobject locale strings 2010-09-12 18:02:40 >> Loaded 1676 PageText locale strings 2010-09-12 18:02:40 >>> Localization strings loaded login game and check around objects, ex: mailbox, chair, store sign, mine, and any books in game, all display name/content from template, not from locales_gameobject or locales_page_text However, all other localization are working fine, creature name, npc chat, quest, and item.
  7. In rev.10342 when doing the following command will crash the server also send items username "title" "content" 22502 22503 22498 22501 22497 22496 22500 22499 23062
  8. The enchanting spell "Black Magic" got the same problem too http://www.wowhead.com/spell=59630 After the SQL ERROR: Duplicate entry log , the next one is SQL ROLLBACK, and everything before that is reverted,
  9. I just apply patches on my server, will see. I was grouping with them, but I was outside of the instance. They were doing Instructor Razuvious in Naxx and I saw half of them dropped. They said they just casted Prayer of Fortitude.
  10. Actually if you enter any instance and use group spells, or some area effect spells while you are grouped, freezes the client. Not really sure how to repeat it, but I can confirm. My testers said they only disconnected in instance.
  11. Well, you just don't get it, just, oh well. I think you don't even know what are _locales_ tables do in database either. And, if you have a better solution to get the same spell ID but highest rank, let us know, and make sure it is not broken after a client switch with newer ranks on spell
  12. You don't even understand Mangos either, that's why you are doing double work. I wrote the localization support in Playbot, you can check with change log. Just put enUS dbc in main dbc folder and create a sub-folder for your own language, like dbc\\FR and it isn't difficult to get a english one... just go to BZ official site and download the client It is good to see the progress on Playbot and everything is doing so great especially for blueboy's work in recently. I haven't update for a long time but I am still following this thread, I mean I just want to point out if someone is going wrong path, no matter if it is hard coded spells or if it is localization supported, just want to let you know there is something there already that can solve your problem more easily and efficiently.
  13. dude, looks like you didn't dig this thread for localization spells issue; I mean you are doing meaningless work. Get a English DBC and your own French DBC then all your spells and mount will work. If you don't understand this please search for the solution.
  14. My players just reported that if someone post an enchantment material such as Infinite Dust, which has no SellPrice, or item has no BuyPrice, buyer will stop buying ANY item until this item expires.......... Anyone wanna look into this?
  15. My suggestion is, you can create a private vendor in GM island and put those on him. so eventually your AH should have those pop. Or, we can request a new table like "associate_ah_item_template", so ah bot will post something from it.
  16. AH Bot will sell only items that vendor sells, and items associate in *_loot_template. Anything that is not associated in tables above then AH bot won't sell it even though you have ton of million item in item_template. if you set AuctionHouseBot.VendorItems = 0, AuctionHouseBot.LootItems = 0, and AuctionHouseBot.OtherItems = 0 then it is very limited item will show up in AH.
  17. c'mom man, collinsp already gave a very good instruction that how to use git on first post
  18. * Fix the crash when a player is logging out with a dead bot and shows "player already has a corpse" in log. * Fix a problem that bot is still lying on the ground with corpse after releasing. Now bot will release in ghost mode and invisiable. * Now bot will summon Fly mount correctly when player summons a Fly mount, if player summons a regular mount, bot will do the same. Patch by yad02 I just pulled the source and went through the old problem: "player already has a corpse", and I found that Bot system did not reset m_deathTimer, which is the countdown timer shown on the screen after player dies and force to release when it hits 0. Mangos use this value to determine creating a corpse if the player releases his spirit or not. Therefore, Bot system did not set this value to 0 after creating a corpse, so when player is logging out with a dead bot, mangos is trying to create another corpse and crashes. The Flymount support is originally made by yad02, I use it on my server for long time. I believe we can make a better one but I don't have time for it.
  19. Ha, you got the point I guess it is because that command argument (PlayerbotAI::HandleCommand) is not wrapped into UTF8 so it can't read those characters I am not sure if it will work, but try to Utf8FitTo() for text (the argument parameter) in PlayerbotAI::HandleCommand (or other way to read as UTF8)
  20. I think it is too custom, why don't use what is already in the Mangos system instead of creating a new table for duplicate work? I believe you don't understand what are these 5 simple lines do. By the way, in order to have spell locale working, you have to install both enUS and frFR DBC file.
  21. If I am right when you decrease purple's percentage you have to increase others (white green blue) to keep sum in 100%.
  22. Let me explain First of all, you have to install a enUS dbc, then you can expand your own dbc files in any subfolder like enGB zhTW etc. Second, Playerbot is storing IDs, not by name. For spells, look into codes, you should find out that there is a function (PlayerbotAI::getSpellId) passing spell name parameter and returning an integer. It is the function searching for a spell in english and return the spell ID. So do quests and items. So, mangos will use English of course by default, and so do bots you summon (bot is assigned in enUS locale, check HandlePlayerBotLoginCallback() in CharacterHandler.cpp, you will see). Therefore, with my patch, for example zhTW is client #5, and when I login with Mandarin WoW client, mangos will assign zhTW dbc for the client. Whenever you type a spell or a quest in Mandarin language, my patch search for the spell in zhTW dbc file or look for the quest name in locale_quest column 5 in DB, and then return the ID. Now make sense?
  23. You don't really need to do this actually..... I used to commit a patch that was supporting for multi-language but somehow someone reverted my changes. Check where I commit and search for the code then you should find where it reverts. The patch I made is still working good; works on spells, quests, and mounts.
  24. Mangos Version: 8661 Custom Patches: AHbot SD2 Version: 1476 Database Name and Version : YTDB 513 Vary crash time from 1 minute to 1 hour. Higher chance to crash server when a map is loading. In debug mode, gdb ended up with this all the time (8 runs): mangos-worldd: ../../../src/game/../framework/GameSystem/TypeContainer.h:78: static bool TypeUnorderedMapContainer<OBJECT_TYPES, KEY_TYPE>::insert(ContainerUnorderedMap<SPECIFIC_TYPE, KEY_TYPE>&, KEY_TYPE, SPECIFIC_TYPE*) [with SPECIFIC_TYPE = Creature, OBJECT_TYPES = TypeList<Creature, TypeList<Pet, TypeList<Vehicle, TypeList<GameObject, TypeList<DynamicObject, TypeNull> > > > >, KEY_TYPE = long unsigned int]: Assertion `i->second == obj && "Object with certain key already in but objects are different!"' failed. Program received signal SIGABRT, Aborted. [switching to Thread 0x7fae6e154950 (LWP 9587)] 0x00007fae767bdfb5 in raise () from /lib/libc.so.6 Occur very often when a player is entering the world, or when a player is teleporting (spell, portal) to a different map. Debug log can find these always before gdb halt: VMAP loaded name:Northrend, id:571, x:24, y:38 VMAP loaded name:Eastern Kingdoms, id:0, x:34, y:33 VMAP loaded name:Kalimdor, id:1, x:45, y:35
  25. Oh finally someone found and looked into this I knew they were selling commercial version over year, or longer than that. And there are actually "2" vendors doing this (two different forum).... I know one of their administrator They are selling Trinity version and Mangos version, they restrict each version by limiting the maximum user per complied core. Therefore, yes, they are selling complied mangos/trinity, or selling Dedicated server with pre-installed mangos/trinity. When I found out that my script posted on ScriptDev2 are implemented in their cores... I stopped my work on ScriptDev2. I also told them stop taking my scripts but they blame me that when I post them, I mean to share for free (GPL). Well.... I read Chinese..... but I am not Chinese though.
×
×
  • 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