pasdVn
-
Posts
261 -
Joined
-
Last visited
Never -
Donations
0.00 GBP
Content Type
Profiles
Bug Tracker
Wiki
Release Notes
Forums
Downloads
Blogs
Events
Posts posted by pasdVn
-
-
Ok. The second one was in fact just an example how warnings are printed out normally (as much as I understand it), and how C::B can parse and recognize them as warnings.
The question is, if the first message is really a kind of error/warning, or if it just missdirected to std::error.
If it is a warning, why has it not the format of other warnings.
If it is an error, why is the build successfull^^?
-
Hey guys,
stupid topic-subject, but I did not find a better one . I want to use Codblocks as an confortable IDE to develope mangos at linux (ubuntu in detail). Therefore I use the auto-generated makefiles, what works quite well. I just have a single problem when building the "thread building blocks" library: During the buildprocess there is a single output at std:error:
../../../dep/tbb/build/Makefile.tbb:39: CONFIG: cfg=release arch=intel64 compiler=gcc os=linux runtime=cc4.4.4_libc2.12.1_kernel2.6.35
I would not mind this sensless error/warning, but Codeblocks can not parse this output and so identifies this as an error (so the build was not successfull for C::B). As much as I could find out, normal warnings of gcc always consist of line that prints out the file and and a next one, that specifies the line and contains the word "warning" like this (C::B uses regexes to parse this output):
../../../../src/game/vmap/MapTree.cpp: In member function 'bool VMAP::StaticMapTree::LoadMapTile(uint32, uint32, VMAP::VMapManager2*)': ../../../../src/game/vmap/MapTree.cpp:383: warning: ignoring return value of 'size_t fread(void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result
Can anybody give me a hint, what the error/warning above is about, or how I can fix it, that it get's printed to std::out? I not very used to the whole gnu autobuild tools and have no idea where to start to fix it.
As a walkaround I could redirect std::error to /dev/null or anywhere else, but I don't want to do it, if I don't have to :-/.
pasdVn
-
Really old bug -> Here a really old patch, but at least shows the idea:
http://github.com/pasdVn/mangos/commit/3167d7d451fdc8ef9a2a68cb9244b66ae8693fb1
-
Hey guys,
need the help of one of you pros one more time ;-) It is probably more a generic programming problem. That is why I post it here.
Following szenario: I want to access the class PetAI from an extern scripting project (to be more specific: scriptdev2). I use the following code (just a minimal example):
/* Copyright (C) 2006 - 2010 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* ScriptData SDName: Pet_Scripts SD%Complete: ?? SDComment: Here is the place for scripted AI for guardian and mini pets. SDCategory: Pets EndScriptData */ #include "precompiled.h" #include "PetAI.h" struct MANGOS_DLL_DECL pet_simple_guardianAI : public PetAI { pet_simple_guardianAI(Creature* pCreature): PetAI(pCreature) { } }; CreatureAI* GetAI_pet_simple_guardian(Creature* pCreature) { if (pCreature->isPet()) return new pet_simple_guardianAI(pCreature); else return NULL; } void AddSC_pets() { Script *newscript; newscript = new Script; newscript->Name = "pet_simple_guardian"; newscript->GetAI = &GetAI_pet_simple_guardian; newscript->RegisterSelf(); }
I ofc also added the declaration and call in ScriptLoader.cpp and defined PetAI as MANGOS_DLL_SPEC to get acess from the extern dll.
The Problem: Code compiles and works until the pet (guardian pet) get's delete (and thus the AI). I always a get a crash at the destructor which I can not really understand.
> msvcr90d.dll!operator delete(void * pUserData=0x6eaebee0) Line 52 + 0x51 bytes C++mangosscript.dll!std::allocator<std::_Tree_nod<std::_Tset_traits<unsigned __int64,std::less<unsigned __int64>,std::allocator<unsigned __int64>,0> >::_Node>::Deallocate(std::_Tree_nod<std::_Tset_traits<unsigned __int64,std::less<unsigned __int64>,std::allocator<unsigned __int64>,0> >::_Node * _Ptr=0x6eaebee0, unsigned int __formal=1) Line 140 + 0x9 bytes C++
mangosscript.dll!std::_Tree<std::_Tset_traits<unsigned __int64,std::less<unsigned __int64>,std::allocator<unsigned __int64>,0> >::_Erase(std::_Tree_nod<std::_Tset_traits<unsigned __int64,std::less<unsigned __int64>,std::allocator<unsigned __int64>,0> >::_Node * _Rootnode=0x6eaebee0) Line 1173 C++
mangosscript.dll!std::_Tree<std::_Tset_traits<unsigned __int64,std::less<unsigned __int64>,std::allocator<unsigned __int64>,0> >::clear() Line 972 C++
mangosscript.dll!std::_Tree<std::_Tset_traits<unsigned __int64,std::less<unsigned __int64>,std::allocator<unsigned __int64>,0> >::erase(std::_Tree<std::_Tset_traits<unsigned __int64,std::less<unsigned __int64>,std::allocator<unsigned __int64>,0> >::const_iterator _First=27, std::_Tree<std::_Tset_traits<unsigned __int64,std::less<unsigned __int64>,std::allocator<unsigned __int64>,0> >::const_iterator _Last=1065353216) Line 938 C++
mangosscript.dll!std::_Tree<std::_Tset_traits<unsigned __int64,std::less<unsigned __int64>,std::allocator<unsigned __int64>,0> >::_Tidy() Line 1421 + 0xaa bytes C++
mangosscript.dll!std::_Tree<std::_Tset_traits<unsigned __int64,std::less<unsigned __int64>,std::allocator<unsigned __int64>,0> >::~_Tree<std::_Tset_traits<unsigned __int64,std::less<unsigned __int64>,std::allocator<unsigned __int64>,0> >() Line 541 C++
mangosscript.dll!std::set<unsigned __int64,std::less<unsigned __int64>,std::allocator<unsigned __int64> >::~set<unsigned __int64,std::less<unsigned __int64>,std::allocator<unsigned __int64> >() + 0x2b bytes C++
mangosscript.dll!PetAI::~PetAI() + 0x54 bytes C++
mangosscript.dll!pet_simple_guardianAI::~pet_simple_guardianAI() + 0x2b bytes C++
mangosscript.dll!pet_simple_guardianAI::`scalar deleting destructor'() + 0x2b bytes C++
mangosd.exe!Creature::~Creature() Line 149 + 0x28 bytes C++
mangosd.exe!Pet::~Pet() Line 59 + 0x45 bytes C++
mangosd.exe!Pet::`scalar deleting destructor'() + 0x16 bytes C++
mangosd.exe!Map::DeleteFromWorld<Creature>(Creature * obj=0x6e8a4000) Line 248 + 0x22 bytes C++
mangosd.exe!Map::Remove<Creature>(Creature * obj=0x6e8a4000, bool remove=true) Line 733 C++
mangosd.exe!Map::RemoveAllObjectsInRemoveList() Line 1521 C++
mangosd.exe!MapManager::RemoveAllObjectsInRemoveList() Line 276 + 0x1d bytes C++
mangosd.exe!World::Update(unsigned int diff=141) Line 1553 C++
mangosd.exe!WorldRunnable::run() Line 61 C++
mangosd.exe!ACE_Based::Thread::ThreadTask(void * param=0x72085900) Line 187 + 0xf bytes C++
ACEd.dll!ACE_OS_Thread_Adapter::invoke() Line 90 + 0x9 bytes C++
ACEd.dll!ace_thread_adapter(void * args=0x0bc319d8) Line 124 + 0xf bytes C++
msvcr90d.dll!_callthreadstartex() Line 348 + 0xf bytes C
msvcr90d.dll!_threadstartex(void * ptd=0x0bc35988) Line 331 C
kernel32.dll!76751194()
[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]
ntdll.dll!77cab495()
ntdll.dll!77cab468()
I guess, that is somehow to do with the dll export (I do not really understand that much of those things) as the code runs _without_ problems at linux.
I already tried various things, as definig the destructor explicit in PetAI/ pet_simple_guardianAI, make it virtual (althoug it anway only is called via CreatureAI pointers), using a class instead of a struct etc.
Did not have success until now. Always the same crash.
Hope anybody of you can give me a hint.
Greetings pasdVn
Edit: Omg. Finally I got it work! I defined an empty destructor for petAI, but not in the header, but in the cpp file. Probably he had problems, when calling the default destructor of a mangos-own function (bt: mangosscript.dll!PetAI::~PetAI() + 0x54 bytes C++ ).
-
looks really interesting :-)
-
Just a little Bump. Patch is still needed, as I think.
-
Hey guys,
here comes just a little patch to fix a custom behaviour of the paladins Blessing of Kings and Blessign of sanctuary. The stat percent aura of sanctuary (sta and str) should NOT be applied when BoK is already on this player.
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index f2641e5..a5e29a5 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -3023,6 +3023,10 @@ void Aura::HandleAuraDummy(bool apply, bool Real) case 20911: // Blessing of Sanctuary case 25899: // Greater Blessing of Sanctuary { + // check for (Greater) Blessing of Kings + if (target->GetAura(SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE, SPELLFAMILY_PALADIN, UI64LIT(0x0000000001000000))) + break; + if (apply) target->CastSpell(target, 67480, true, NULL, this); else @@ -6975,6 +6979,24 @@ void Aura::HandleSpellSpecificBoosts(bool apply) else if (!apply) caster->RemoveAurasDueToSpell(64364); } + if (m_spellProto->SpellFamilyFlags & // (Greater) Blessing of Kings + UI64LIT(0x0000000001000000)) + { + // check for (Greater) Blessing of Sanctuary + if (!m_target->GetAura(SPELL_AURA_DUMMY, SPELLFAMILY_PALADIN, UI64LIT(0x0000000010000000)) + break; + + if (!apply) + { + cast_at_remove = true; + spellId1 = 67480; + } + else + m_target->RemoveAurasDueToSpell(67480); + + break; + } + if (m_spellProto->Id == 31884) // Avenging Wrath { if(!apply)
-
I didn;t expected that you will respond so fast at that github comment thank you
Hehe :-) It was less work than I thought. Anyway sorry for not having updated for a long time.
Please report bugs again, if anything is not working.
-
Updated for rev [10051].
Also added an additional patch for scaling problems with the pet talent "wild hunt" (update scaling auras on cast).
Hope it workes. Don't have a clean db currently to try it...
-
Du you use also the 2nd part? Patch is anyway outdatet. It was a nice idea, but also does not work corect in every case. I'm using another sollution currently on 'my' server. Maybe I'm going to provide it here and update this thread.
-
I did not know about the hot problematic (to be honest I doubt that...), but you can try those two patches to make the coefficient part (at least nearly) and the dispel part work correct.
http://github.com/orangevirus/mangos/commit/7ba9038c8df62911b6465bac1850bad4fb8ad1d3
http://github.com/orangevirus/mangos/commit/9ed745914b2a77235f8e0d7b9bbb88bf51f50cab
-
at least according to my info current way is how it should be
Yes, that is the correct behavior! I checked that on an official server some time ago.
Thanks for this patch btw, laise :-)
-
- * the hardcoded "4" does not fit in any case (neither immolate, nor shadowflame)
* the dot damage also needs a custom calculation (don't know if this worked before the dmg calc. patch somehow!?)
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index e6de009..0d2af4a 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -515,8 +515,14 @@ void Spell::EffectSchoolDMG(SpellEffectIndex effect_idx) // found Immolate or Shadowflame if (aura) { - int32 damagetick = aura->GetModifier()->m_amount; - damage += damagetick * 4; + // get damage of dot aura + int32 basepoints = aura->GetModifier()->m_amount; + basepoints *= aura->GetAuraMaxDuration() / aura->GetModifier()->periodictime; + + // 60% of the dot aura damage is direct damage, value stored in basepoints of effect 1 + damage = basepoints * m_currentBasePoints[EFFECT_INDEX_1] / 100; + // 40% of the dot aura damage is dot damage, value stored in basepoints of effect 2 + m_currentBasePoints[EFFECT_INDEX_1] = basepoints * m_currentBasePoints[EFFECT_INDEX_2] / (100 * GetSpellAuraMaxTicks(m_spellInfo)); // Glyph of Conflagrate if (!m_caster->HasAura(56235))
Problem we still have with this and similar spells is, that they additionally get their 'own' bonuses applied in spelldamagebonusdone() as they are no DIRECT_DAMAGE. Maybe there exists an attribute or anything that we could use?
- * the hardcoded "4" does not fit in any case (neither immolate, nor shadowflame)
-
Just a small fix: The dmg of the dispel trigger should use the basevalue, not the modified one (new splitted damge calc system...).
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 3cc6fe0..d057dde 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -4288,7 +4288,9 @@ void Unit::RemoveSingleAuraDueToSpellByDispel(uint32 spellId, uint64 casterGUID, { if (Aura* dotAura = GetAura(SPELL_AURA_PERIODIC_DAMAGE,SPELLFAMILY_WARLOCK,UI64LIT(0x010000000000),0x00000000,casterGUID)) { - int32 damage = dotAura->GetModifier()->m_amount*9; + // use clean value for initial damage + int32 damage = dotAura->GetSpellProto()->CalculateSimpleValue(EFFECT_INDEX_0); + damage *= 9; // Remove spell auras from stack RemoveSingleSpellAurasByCasterSpell(spellId, casterGUID, AURA_REMOVE_BY_DISPEL);
-
Hi,
currently it is possible, that temporary summons are abled to respawn, if the left lifetime of the summon (TemporarySummon::m_timer) when the creature get's killed, is greater than Creature::m_deathTimer + 25s (default respawn time).
In this case Creature::Update will remove the corpse and respawn the summon.
From 10e25b27b930627be9ee40ceec923d02d69207ec Mon Sep 17 00:00:00 2001 From: pasdVn <[email protected]> Date: Fri, 9 Apr 2010 11:21:54 +0200 Subject: [PATCH] Fixed respawn bug for temporary summons. --- src/game/Creature.cpp | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index b50d4aa..b0c193c 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -365,6 +365,10 @@ void Creature::Update(uint32 diff) break; case DEAD: { + // no respawn handling for temporary summons + if (isTemporarySummon()) + break; + if( m_respawnTime <= time(NULL) ) { DEBUG_LOG("Respawning..."); -- 1.6.5.1.1367.gcd48
Alternative fixes could be:
- * always unsummon if m_deathState == DEAD (so if the corpse is removed). Imo you don't need any summon that is dead and without corpse anymore (as it should never respawn)
* set m_respawnDelay to some days in the constructor of temporarySummon (or somewhere else), but I think that is crap
- * always unsummon if m_deathState == DEAD (so if the corpse is removed). Imo you don't need any summon that is dead and without corpse anymore (as it should never respawn)
-
Hmm, ok, maybe I expressed it wrong: The patch in the core is not written by me, but my version did exactly the same. I did not want you to move it to accepted with my post or so^^
The core's version is written by apoc: http://github.com/mangos/mangos/commit/c2a83d348261fa96286493225e3d2c8504169639
-
Yes... already in the core in this version...
-
Yes, you are right. This is caused by this patches.
I took my old version of the 3rd part again (the workaround), so that pets will keep their percental heath/mana when (re)applying stamina/intellect scaling aura (what should fix this problem).
Also merged/rebase branch and patches with/onto [9635] (but no merge errors, so it's not really needed).
-
This is just sql than...
-
Hmm, ok - I see. Maybe a better sollution would be not to clear all auras on enterning evade mode? Something like RemoveAllAurasExceptInrinsic(...) or so?
-
This is not the intention of this fix. It is just a generic fix, out of the interpretation of this proc flag. I will allow to fix L'n'L and entrapment in a very clean way.
(If you want L'n'l working try http://github.com/pasdVn/mangos/commit/3808945a9c1a28f58d92d0653676a8d7089939c3 and http://github.com/orangevirus/mangos/blob/master/sql/custom/059_01_mangos_spell_proc_event_%28pasdVn%29.sql)
-
Thank you for patch
* lightwell is respawning if ForcedDespawn() used to despawn so I had to use AddObjectToRemoveList()I think TemporarySummon::UnSummon() should be a better sollution, bu in the end it does the same
-
Ouch. That is a typo. Thank you. Fixed it
-
Updated again, as the Frost Trap mechanics have changed in the meantime.
[11167][Patch] Entirely new build-system for MaNGOS-Core
in ... acceptedOld
Posted
Wow, amazing!
Sounds really good. Especially because I just tried to work with c::b at linux :-)
Edit: Hmm, can't find the thanks-button -.-