Jump to content

darkstalker

Members
  • Posts

    717
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by darkstalker

  1. 51466/51470 are the passive talent auras, damage mod only depends from how much talent points you invested in Elemental Oath, maybe you misunderstood with the Elemental Oath proc (53410/43414) only thing needed to change is if ( GetId() == 16246 ) so doesnt add value twice when removing aura: // Elemental Oath - Damage increase on Clearcasting if (apply && GetId() == 16246) { Unit::AuraList const& auras = m_target->GetAurasByType(SPELL_AURA_PROC_TRIGGER_SPELL); for (Unit::AuraList::const_iterator i = auras.begin(); i != auras.end(); ++i) if ((*i)->GetId() == 51466 || //Elemental Oath rank 1 (*i)->GetId() == 51470) //Elemental Oath rank 2 { m_modifier.m_amount += (*i)->GetSpellProto()->CalculateSimpleValue(1); break; } }
  2. that declaration uint32 triggered_spell_id; gives the variable a random value in memory, use instead uint32 triggered_spell_id = 0;
  3. mangos devs care about the quality of the code, end users only want features
  4. try using SpellFamilyFlags & 0x08000000 instead of SpellIconId, and use "default: return" in the switch, otherwise you could cast a random spell (uninitialized variable triggered_spell_id). The return inside the "if" is reduntant. edit: change this to add threat to player instead of totem totem->CastSpell(totem, triggered_spell_id, true, NULL, NULL, m_caster->GetGUID());
  5. i dont think deleting stuff is a good idea
  6. having all that patches at once will only make your core more unstable and buggy than clean mangos (most of them are dev versions not ready for production use)
  7. windfure does have a cd (3 secs), its working properly
  8. i think it should be QueryResult *result = CharactersDatabase.PQuery("SELECT count(*) FROM characters WHERE account = %u AND level = 80", pPlayer->GetSession()->GetAccountId()); if (result) { Field *Fields = result->Fetch(); uint32 count = Fields[0].GetUInt32(); //Get if have a level 80 from database if (count >= 1) // test if have a level 80 in the account of player, HERE YES {
  9. add main hand/offhand proc checking too?
  10. is it possible to change it? i've noticed this problem too
  11. use spell_target_position
  12. try using the mangos source to make sql dumps
  13. probably is dereferencing a deleted object or something like that
  14. my suggested modifications: DROP TABLE IF EXISTS `mail_external`; CREATE TABLE `mail_external` ( `id` int(20) unsigned NOT NULL auto_increment, `receiver` bigint(20) unsigned NOT NULL, `subject` varchar(200) default 'Support Message', `message` varchar(500) default 'Support Message', `money` int(20) unsigned NOT NULL default '0', `item` int(20) unsigned NOT NULL default '0', `item_count` int(20) unsigned NOT NULL default '1', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; void WorldSession::SendExternalMails() { sLog.outString("EXTERNAL MAIL> Send Mails from Queue..."); QueryResult *result = CharacterDatabase.Query("SELECT id,receiver,subject,message,money,item,item_count FROM mail_external"); if(!result) { sLog.outString("EXTERNAL MAIL> No Mails in Queue."); delete result; return; } do { Field *fields = result->Fetch(); uint32 id = fields[0].GetUInt32(); uint64 receiver_guid = fields[1].GetUInt64(); std::string subject = fields[2].GetString(); std::string message = fields[3].GetString(); uint32 money = fields[4].GetUInt32(); uint32 ItemID = fields[5].GetUInt32(); uint32 ItemCount = fields[6].GetUInt32(); if (Player *receiver = sObjectMgr.GetPlayer(receiver_guid)) { sLog.outString("EXTERNAL MAIL> Sending mail to %u, Item: %u", receiver_guid, ItemID); uint32 itemTextId = !message.empty() ? sObjectMgr.CreateItemText(message) : 0; if (ItemID && ItemCount < 1) { sLog.outString("EXTERNAL MAIL> Warning: invalid ItemCount of %u, setting to 1", ItemCount); ItemCount = 1; } Item* ToMailItem = ItemID ? Item::CreateItem(ItemID, ItemCount, receiver) : NULL; if (ToMailItem) { ToMailItem->SaveToDB(); MailDraft(subject, itemTextId) .AddItem(ToMailItem) .AddMoney(money) .SendMailTo(MailReceiver(receiver), MailSender(MAIL_NORMAL, 0, MAIL_STATIONERY_GM), MAIL_CHECK_MASK_RETURNED); } else { MailDraft(subject, itemTextId) .AddMoney(money) .SendMailTo(MailReceiver(receiver), MailSender(MAIL_NORMAL, 0, MAIL_STATIONERY_GM), MAIL_CHECK_MASK_RETURNED); } CharacterDatabase.PExecute("DELETE FROM mail_external WHERE id=%u", id); } else sLog.outString("EXTERNAL MAIL> Player %u not in game, skip mail!", receiver_guid); } while(result->NextRow()); delete result; sLog.outString("EXTERNAL MAIL> All Mails Sent."); }
  15. crashes if item_count == 0 or item doesnt exist, so additional checks needed
  16. nice patch, but i think it has some problems, first i think this is incorrect: if (level == BOSS_LEVEL) { resistanceConstant = BOSS_RESISTANCE_CONSTANT; } should use pVictim->isWorldBoss() instead and this: float victimResistance = baseVictimResistance + ignoredResistance; shouldn't it substract instead? or maybe i understood wrong and: uint32 level = getLevel(); it should be pVictim->getLevel() i guess
  17. implement this? &Spell::EffectUnused, // 87 SPELL_EFFECT_WMO_DAMAGE &Spell::EffectUnused, // 88 SPELL_EFFECT_WMO_REPAIR &Spell::EffectUnused, // 89 SPELL_EFFECT_WMO_CHANGE
  18. i think you should add triggered spell in Spell::cast
×
×
  • 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