Jump to content

Toinan67

Members
  • Posts

    389
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by Toinan67

  1. I agree with you, and I'll go even more for the "no" this time ^^ It would be annoying to have half of the script in the DB and half in C++. So, at the moment it's better to script them in C++.
  2. sorry i didn't want to make you react like that, it was really not criticism I was not saying that you don't fix spells, I was saying that maybe you think the way those spells are handled is the best it could be at the moment. I know you recently made a huge commit (talking about this one). I was just asking questions, and give my (noob?) opinion to this. I look at commit log 3 times a day, I know you work very hard and again sorry if you felt "offensed" "I mean srsly u cant put c++ scripts there" -> for me this would be the best! (not C++ scripts in DB, but data that the core could handle exactly how we want it) I agree, not a standard implementation, each spell need special code. All I was saying is that maybe some part could be automatic. Of course a lot of spells would still need hardcoded things. Imo it's not counter-intuitive, but it is just my opinion and I wanted to know the "guys-who-know"'s opinion
  3. EventAI has limits now, but imo, in the future, it should become the main boss-scripting system. It's fun to script boss in C++ with ScriptDev2, but having a great SQL-based feature would be better for all
  4. Toinan67

    Function needed!

    As maly said you should cast a spell on the boss to add an aura to him (look at wowhead to see which aura). Unit.h : // set withDelayed to true to interrupt delayed spells too // delayed+channeled spells are always interrupted void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid = 0); So I suggest to call InterruptNonMeleeSpells(true), it will interrupt really all the spells.
  5. Maybe you're right... But I think the "perfect" way would be to have 0 hardcoded things (quite impossible at the moment I imagine). The core should be there to execute what "something else" (opcodes, DB, ...) asks him to do. For opcodes, we have a sender, the client, and a receiver, the core, which acts according to them. For creatures, we have a "sender", the DB (creature_* tables), and a receiver, the core, which creates creatures according to the DB content. For those spells, we do not really have a sender...the core works with the core itself. Look at all this : EffectSchoolDMG, EffectDummy, EffectTriggerSpell, EffectTeleportUnits, EffectWeaponDmg, TriggerSpell, HandleAuraDummy, HandlePeriodicDamage, ... All those methods have a specific harcoded behavior for dozens of spells, imo it is much more easy (to fix, create, modify, adjust, replace, delete) with a DB table well designed, which would become the "sender" in the example above. The problem is that this table may be huge and increase the ram-consumption of the core I believe. I also believe that MaNGOS devs started this way (hardcoded things I mean), and today they don't want to "lose" time by modifying something that works well for everyone. But someday we'll have a 50,000 lines "SpellEffects.cpp"...
  6. Well, the general question was not really "Is MaNGOS coded the right way" (even if I understand you can think this). I think that on this particular point, there are clear improvements that could be done on something that is very important to the game (spells). I know devs have no idea how the official core is written, it was more like a rhetorical question ^^ Let's take an example in SpellAuras.cpp : case 32051: // Soul Charge { if (m_removeMode == AURA_REMOVE_BY_EXPIRE) target->CastSpell(target, 32057, true, NULL, this); return; } case 32052: // Soul Charge { if (m_removeMode == AURA_REMOVE_BY_EXPIRE) target->CastSpell(target, 32053, true, NULL, this); return; } case 32286: // Focus Target Visual { if (m_removeMode == AURA_REMOVE_BY_EXPIRE) target->CastSpell(target, 32301, true, NULL, this); return; } Or in SpellEffects.cpp : case 23074: // Arcanite Dragonling { if (!m_CastItem) return; m_caster->CastSpell(m_caster, 19804, true, m_CastItem); return; } case 23075: // Mithril Mechanical Dragonling { if (!m_CastItem) return; m_caster->CastSpell(m_caster, 12749, true, m_CastItem); return; } case 23076: // Mechanical Dragonling { if (!m_CastItem) return; m_caster->CastSpell(m_caster, 4073, true, m_CastItem); return; } case 23133: // Gnomish Battle Chicken { if (!m_CastItem) return; m_caster->CastSpell(m_caster, 13166, true, m_CastItem); return; } I could find a lot more examples. Is there no way to avoid such little "case", for example adding a spell_dummy table or something like that? The core would be lighter, and implementing a new dummy spell would be no more than a SQL patch. Easier, no?
  7. You could find it yourself In your mangos DB, "mangos_string" table, 3rd record, you see this is the message that is sent when you make an announce. The 3rd record in Language.h corresponds to "LANG_SYSTEMMESSAGE". LANG_SYSTEMMESSAGE can be found in Level1.cpp, HandleAnnounceCommand. Then you can do it with sWorld.SendWorldText(LANG_SYSTEMMESSAGE,m_session->GetPlayer()->GetName(),args); You'll have to modify the 3rd record in mangos_string table, so that it show a string (%s) instead of "System message".
  8. Interesting thread. I was quite sure there was a better way than spending hours fixing, adjusting and testing the same patches every time you want to update ("what a pain" as you said ) Using the git local branch method, I believe it will be almost the same for adjusting our modifications, right? So the right order would be : Creating the local branch : git branch my_local_branch Go to this branch : git checkout my_local_branch And once you have done all your modifications, go to the branch master, apply all your work to it, and then pull from the official mangos sources : git checkout master git merge my_local_branch git pull At this point, we may have a few errors I suppose. Am I right with all that?
  9. Btw, I'm curious to see when others projects will achieve commits like that.
  10. Hello, I'm currently really (really, really) bored. And when I'm bored, I ask myself existential questions. I'd like to know, if someone knows or is experienced enough to suppose it, how official servers handle "special spells". By "special spells" I mean spells which have a "Apply Aura : Dummy" or "Effect : Script Effect" or whatever that is not precise (such as "Effect : Modify Health, value : 8"). I've seen that the official core was written in C++, too. Do they handle it the way MaNGOS handles it? Like "case spellId : code; break;" ? If they don't, why does MaNGOS does it like that? Wouldn't be a LOT better to have a really complete list of SCRIPT_EFFECT_SOMETHING, and an automatic behavior even for "Apply Aura : Dummy" or "Effect : Script Effect" kind of spells? I'm asking this because I'm quite...let's say "impressed" when I look at files such as SpellAuras.cpp or SpellEffects.cpp, with hundreds of "case spellId : specific behavior for this spell; break;" I mean, I'm sure 80% of those "case" could be avoided with a "spell_aura_dummy" table or something like that. Well, I just figured out there's a spell_scripts table (don't laugh.), for SPELL_EFFECT_SCRIPT_EFFECT. Anyway, why is there still "case" for script effects? Thanks for sharing your knowledge!
  11. Omg you need to say something we can understand If your friend uses database to do what you want to do, why don't you simply ask him how he does it?...
  12. Who cares about the eye of acherus?
  13. There's already a method in Player which can help you : SendMovieStart(uint32 MovieId) You just have to find the movieId
  14. +1 freghar "(Links in my signature and ya, I take PayPal donations, but please don't feel obligated to do that!)" Calm down, boy. The help you provided is nice, thank you, but asking for Paypal donations for that is a bit too much
  15. We're waiting for you to write it
  16. Well, maybe your tank roxx, whereas your dps sucks Or maybe there's a bug, I don't know
  17. I don't really understand what's happening, even with the screenshot The player "Cademy" has 0 hp but is not dead? In this case, is the player still able to move?
  18. Did you do : automake src/bindings/ScriptDev2/Makefile ? Then the error says "undefined reference to `AddSC_CopperToGold()'" => CopperToGold You wrote "AddSC_coppertogold()". Try with "AddSC_CopperToGold()"
  19. Toinan67

    unaura

    RemoveAuraDueToSpell(spellId)
  20. Well, if there was any official patch, it would be in MaNGOS at this time :rolleyes: I saw few Mirror image threads on this forum, with various patches. Just use the "Search" button on the upper right corner
  21. // ignore if player is already in BG if (_player->InBattleGround()) return; Delete those 3 lines, what happens?
×
×
  • 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