Jump to content

ifilgud

Members
  • Posts

    38
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by ifilgud

  1. Hi! I have been using the Settings page to know with threads had new posts, but now I know how to susbcribe to a thread and ask for email notification, thanks
  2. Thanks Patman! So you can search for active auras on you or on your target using this class? I'm trying to flix diseases consumptions of Obliterate hehe.
  3. If you get error 500 I think it's because you dont have mod_rewrite enabled. And if you have it but it is not working, is because the rules in .htaccess. I had to edit the file and add the option mentioned in my first post, RewriteBase. If your armory is under vwc/armory the option might be: RewriteBase /vwc/armory
  4. Hi! I've noticed that I'm not receiving emails about replies to my posts. I've checked my forum config and I cannot see any option that disables this. Can anyone help me please? Thanks!
  5. Hi aski, if you're are referring to my post, I mean the root folder of the armory web. Where you unpack de htaccess.zip
  6. I have a question to ask. My server started to crash today after applying the patch "wowarmory_character_stats_10091.patch". Am I the only one with this problem? Thanks!
  7. Hi! I've had the rewrite problem today and I managed to find the real problem and a solution! I've installed the armory web using an alias in apache 2.2, but the rewrite module does not work perfectly with aliases and htaccess files. I only needed to add this option to .htaccess file in the root folder: RewriteBase Alias_Name For example, my alias is /armory, so the file contains this: # UTF8 support AddDefaultCharset utf8 php_value default_charset UTF-8 RewriteEngine On RewriteBase /armory/ RewriteRule ^(.*).xml $1.php?%{QUERY_STRING} I hope this can help other people Bye!
  8. Hi! I've been looking for a description of new system of auras because I want to learn how the new system works so I can create fixes and update old ones. Is there any existing topic or wiki page about this? Thanks!!
  9. Hi! I've merged the spell effect into current version but the patch is outdated. The handling of auras has changed and it needs to be converted. I don't know much of how auras works now (AuraHolder?) but I will try to learn the system
  10. Hi! I've tried to apply the patch to revision 10317 and it fails in file GridNotifiers.h: patching file src/game/GridNotifiers.h Hunk #1 FAILED at 502. 1 out of 2 hunks FAILED -- saving rejects to file src/game/GridNotifiers.h.rej The rest of the files apply but offsets are needed: patching file sql/CUSTOM/21_mangos_DK_ghouls_raise_dead.sql patching file src/game/GridNotifiers.h Hunk #1 FAILED at 502. 1 out of 2 hunks FAILED -- saving rejects to file src/game/GridNotifiers.h.rej patching file src/game/Pet.cpp patching file src/game/Player.cpp Hunk #1 succeeded at 17597 (offset -2 lines). patching file src/game/Spell.cpp Hunk #2 succeeded at 1547 (offset 6 lines). Hunk #3 succeeded at 1563 (offset 6 lines). Hunk #4 succeeded at 3391 (offset -26 lines). patching file src/game/SpellEffects.cpp patching file src/game/StatSystem.cpp patching file src/game/Unit.cpp Hunk #1 succeeded at 5744 (offset 15 lines). Hunk #2 succeeded at 5762 (offset 15 lines).
  11. Hi! I've modified MaNGOS so you can define some entries in mail_level_reward that allows you to send items to players automatically when the reach specific level. The already implemented system only allows sending mail templates to players without items. This is useful for admins to reward players with whatever the want Modifications: SQL -> table mail_level_reward has now three more columns: 'item', 'subject' and 'text'. If you want to send a custom mail with one item, you have to set field 'mailTemplateId' to 0, if you dont do that, the entry will be handled as normal templated mail. Once you set 'mailTemplateId' to 0, you have to provide a vaild itemId, raceMask, sender (choose a creature ), mail subject and mail body. I will also attach the core patch in addition to SQL patch, and I've also posted this on UDB forum If anyone has suggestions, please post! Edit: I dont know how to attach files (cant see the option!) so I will include the patches in the post: diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index ba3ffde..b12fb26 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -8197,7 +8197,7 @@ void ObjectMgr::LoadMailLevelRewards() m_mailLevelRewardMap.clear(); // for reload case uint32 count = 0; - QueryResult *result = WorldDatabase.Query("SELECT level, raceMask, mailTemplateId, senderEntry FROM mail_level_reward"); + QueryResult *result = WorldDatabase.Query("SELECT level, raceMask, mailTemplateId, senderEntry, item, subject, text FROM mail_level_reward"); if( !result ) { @@ -8222,6 +8222,9 @@ void ObjectMgr::LoadMailLevelRewards() uint32 raceMask = fields[1].GetUInt32(); uint32 mailTemplateId = fields[2].GetUInt32(); uint32 senderEntry = fields[3].GetUInt32(); + uint32 item = fields[4].GetUInt32(); + std::string subject = fields[5].GetCppString(); + std::string text = fields[6].GetCppString(); if(level > MAX_LEVEL) { @@ -8237,8 +8240,19 @@ void ObjectMgr::LoadMailLevelRewards() if(!sMailTemplateStore.LookupEntry(mailTemplateId)) { - sLog.outErrorDb("Table `mail_level_reward` have invalid mailTemplateId (%u) for level %u that invalid not include any player races, ignoring.",mailTemplateId,level); - continue; + if (mailTemplateId == 0) // item must have valid id + { + if (!sItemStorage.LookupEntry<ItemPrototype >(item)) + { + sLog.outErrorDb("Table `mail_level_reward` have invalid mailTemplateId (%u) and item (%u) for level %u that invalid not include any player races, ignoring.",mailTemplateId,item,level); + continue; + } + } + else + { + sLog.outErrorDb("Table `mail_level_reward` have invalid mailTemplateId (%u) for level %u that invalid not include any player races, ignoring.",mailTemplateId,level); + continue; + } } if(!GetCreatureTemplateStore(senderEntry)) @@ -8247,7 +8261,7 @@ void ObjectMgr::LoadMailLevelRewards() continue; } - m_mailLevelRewardMap[level].push_back(MailLevelReward(raceMask,mailTemplateId,senderEntry)); + m_mailLevelRewardMap[level].push_back(MailLevelReward(raceMask,mailTemplateId,senderEntry,item,subject,text)); ++count; } diff --git a/src/game/ObjectMgr.h b/src/game/ObjectMgr.h index d2fac42..c11415e 100644 --- a/src/game/ObjectMgr.h +++ b/src/game/ObjectMgr.h @@ -226,12 +226,15 @@ struct PetLevelInfo struct MailLevelReward { - MailLevelReward() : raceMask(0), mailTemplateId(0), senderEntry(0) {} - MailLevelReward(uint32 _raceMask, uint32 _mailTemplateId, uint32 _senderEntry) : raceMask(_raceMask), mailTemplateId(_mailTemplateId), senderEntry(_senderEntry) {} + MailLevelReward() : raceMask(0), mailTemplateId(0), senderEntry(0), item(0), subject(NULL), text(NULL) {} + MailLevelReward(uint32 _raceMask, uint32 _mailTemplateId, uint32 _senderEntry, uint32 _item, std::string _subject, std::string _text) : raceMask(_raceMask), mailTemplateId(_mailTemplateId), senderEntry(_senderEntry), item(_item), subject(_subject), text(_text){} uint32 raceMask; uint32 mailTemplateId; uint32 senderEntry; + uint32 item; + std::string subject; + std::string text; }; typedef std::list<MailLevelReward> MailLevelRewardList; diff --git a/src/game/Player.cpp b/src/game/Player.cpp index ea98e3d..41f7781 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -2627,7 +2627,17 @@ void Player::GiveLevel(uint32 level) pet->SynchronizeLevelWithOwner(); if (MailLevelReward const* mailReward = sObjectMgr.GetMailLevelReward(level,getRaceMask())) - MailDraft(mailReward->mailTemplateId).SendMailTo(this,MailSender(MAIL_CREATURE,mailReward->senderEntry)); + { + if (mailReward->mailTemplateId != 0) // Send mail with customItem instead of a template + MailDraft(mailReward->mailTemplateId).SendMailTo(this,MailSender(MAIL_CREATURE,mailReward->senderEntry)); + else + { + MailDraft mail (mailReward->subject.c_str(), mailReward->text.c_str()); + Item* item = Item::CreateItem(mailReward->item, 1); + mail.AddItem(item); + mail.SendMailTo(this,MailSender(MAIL_CREATURE,mailReward->senderEntry)); + } + } GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_REACH_LEVEL); } ALTER TABLE mail_level_reward ADD COLUMN `item` mediumint(8) unsigned NOT NULL DEFAULT '0', ADD COLUMN `subject` varchar(30) DEFAULT NULL, ADD COLUMN `text` varchar(100) DEFAULT NULL;
  12. I've got the same error here. I've tried cleaning the project and start over with ./configure and compiling, but the error persists.
×
×
  • 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