Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: sql/world_updates/4632_quest_mail.sql
- ===================================================================
- --- sql/world_updates/4632_quest_mail.sql (revision 0)
- +++ sql/world_updates/4632_quest_mail.sql (revision 0)
- @@ -0,0 +1,3 @@
- +ALTER TABLE `quests` ADD `MailTemplateId` TINYINT( 3 ) UNSIGNED NOT NULL DEFAULT '0' AFTER `CastSpell`;
- +ALTER TABLE `quests` ADD `MailDelaySecs` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AFTER `MailTemplateId`;
- +UPDATE `arcemu_db_version` SET `LastUpdate` = '4632';
- \ No newline at end of file
- Index: src/arcemu-world/DBC/DBCStores.cpp
- ===================================================================
- --- src/arcemu-world/DBC/DBCStores.cpp (revision 4629)
- +++ src/arcemu-world/DBC/DBCStores.cpp (working copy)
- @@ -84,6 +84,7 @@
- SERVER_DECL DBCStorage<gtFloat> dbcSpellCritBase;
- SERVER_DECL DBCStorage<SpellShapeshiftForm> dbcSpellShapeshiftForm;
- SERVER_DECL DBCStorage<QuestXP> dbcQuestXP;
- +SERVER_DECL DBCStorage<MailTemplateEntry> dbcMailTemplateEntry;
- SERVER_DECL DBCStorage<WMOAreaTableEntry> dbcWMOAreaTable;
- SERVER_DECL DBCStorage< SummonPropertiesEntry > dbcSummonProperties;
- SERVER_DECL DBCStorage< NameGenEntry > dbcNameGen;
- @@ -338,6 +339,7 @@
- const char* itemlimitcategoryformat = "usxxxxxxxxxxxxxxxxuu";
- const char* spellshapeshiftformformat = "uxxxxxxxxxxxxxxxxxxuuxuuuxxuuuuuuuu";
- const char* questxpformat = "uxuuuuuuuux";
- +const char* mailTemplateEntryFormat="nsxxxxxxxxxxxxxxxxsxxxxxxxxxxxxxxxx";
- const char* wmoareaformat = "uiiixxxxxuuxxxxxxxxxxxxxxxxx";
- const char* summonpropertiesformat = "uuuuuu";
- const char* namegenentryformat = "usuu";
- @@ -418,6 +420,7 @@
- LOAD_DBC("DBC/ScalingStatValues.dbc", scalingstatvaluesformat, true, dbcScalingStatValues, false);
- LOAD_DBC("DBC/ItemLimitCategory.dbc", itemlimitcategoryformat, true, dbcItemLimitCategory, true);
- LOAD_DBC("DBC/QuestXP.dbc", questxpformat, true, dbcQuestXP, false);
- + LOAD_DBC("DBC/MailTemplate.dbc", mailTemplateEntryFormat, true, dbcMailTemplateEntry, true);
- LOAD_DBC("DBC/WMOAreaTable.dbc", wmoareaformat, true, dbcWMOAreaTable, false);
- LOAD_DBC("DBC/SummonProperties.dbc", summonpropertiesformat, true, dbcSummonProperties, false);
- LOAD_DBC("DBC/NameGen.dbc", namegenentryformat, true, dbcNameGen, true);
- Index: src/arcemu-world/DBC/DBCStores.h
- ===================================================================
- --- src/arcemu-world/DBC/DBCStores.h (revision 4629)
- +++ src/arcemu-world/DBC/DBCStores.h (working copy)
- @@ -1405,6 +1405,17 @@
- //unk // 10
- };
- +struct MailTemplateEntry
- +{
- + uint32 ID; // 0
- + char* subject; // 1
- + //float unused1[15] // 2-16
- + //uint32 flags1 // 17 name flags, unused
- + char* content; // 18
- + //float unused2[15] // 19-34
- + //uint32 flags2 // 35 name flags, unused
- +};
- +
- struct WMOAreaTableEntry
- {
- uint32 id; // 0
- @@ -2004,6 +2015,7 @@
- extern SERVER_DECL DBCStorage<ScalingStatValuesEntry> dbcScalingStatValues;
- extern SERVER_DECL DBCStorage<ItemLimitCategoryEntry> dbcItemLimitCategory;
- extern SERVER_DECL DBCStorage< QuestXP > dbcQuestXP;
- +extern SERVER_DECL DBCStorage<MailTemplateEntry> dbcMailTemplateEntry;
- extern SERVER_DECL DBCStorage<WMOAreaTableEntry> dbcWMOAreaTable;
- extern SERVER_DECL DBCStorage< SummonPropertiesEntry > dbcSummonProperties;
- extern SERVER_DECL DBCStorage< NameGenEntry > dbcNameGen;
- Index: src/arcemu-world/Master.h
- ===================================================================
- --- src/arcemu-world/Master.h (revision 4630)
- +++ src/arcemu-world/Master.h (working copy)
- @@ -43,7 +43,7 @@
- #define BUILDTYPE "Release"
- #endif
- -#define REQUIRED_WORLD_DB_VERSION 4630
- +#define REQUIRED_WORLD_DB_VERSION 4632
- #define REQUIRED_CHAR_DB_VERSION 4479
- #define DEFAULT_LOOP_TIME 0 /* 0 milliseconds - instant */
- Index: src/arcemu-world/ObjectStorage.cpp
- ===================================================================
- --- src/arcemu-world/ObjectStorage.cpp (revision 4630)
- +++ src/arcemu-world/ObjectStorage.cpp (working copy)
- @@ -32,7 +32,7 @@
- const char * gAreaTriggerFormat = "ucuusffffuu";
- const char * gItemPageFormat = "usu";
- const char * gNpcTextFormat = "ufssuuuuuuufssuuuuuuufssuuuuuuufssuuuuuuufssuuuuuuufssuuuuuuufssuuuuuuufssuuuuuuu";
- -const char * gQuestFormat = "uuuuuuuuuuuuuuuuuuussssssssssuuuuuuuuuuuuiiiiuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuiiiiiiuiuuuuuuuuuuuusuuuusuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu";
- +const char * gQuestFormat = "uuuuuuuuuuuuuuuuuuussssssssssuuuuuuuuuuuuiiiiuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuiiiiiiuiuuuuuuuuuuuuuusuuuusuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu";
- //const char * gSpellExtraFormat = "uuuu";
- const char* gGraveyardFormat = "uffffuuuux";
- const char* gTeleportCoordFormat = "uxufffx";
- Index: src/arcemu-world/Quest.h
- ===================================================================
- --- src/arcemu-world/Quest.h (revision 4630)
- +++ src/arcemu-world/Quest.h (working copy)
- @@ -192,6 +192,9 @@
- uint32 reward_spell;
- uint32 effect_on_player;
- + uint32 MailTemplateId;
- + uint32 MailDelaySecs;
- +
- uint32 point_mapid;
- uint32 point_x;
- uint32 point_y;
- Index: src/arcemu-world/QuestMgr.cpp
- ===================================================================
- --- src/arcemu-world/QuestMgr.cpp (revision 4630)
- +++ src/arcemu-world/QuestMgr.cpp (working copy)
- @@ -1370,6 +1370,13 @@
- plr->AddToFinishedQuests((*iter));
- }
- }
- +
- + if( qst->MailTemplateId )
- + {
- + MailTemplateEntry * mail = dbcMailTemplateEntry.LookupEntryForced( qst->MailTemplateId );
- + if( mail != NULL )
- + sMailSystem.SendAutomatedMessage( NORMAL, qst_giver->GetGUID(), plr->GetGUID(), mail->subject, mail->content, 0, 0, 0, MAIL_STATIONERY_TEST1, qst->MailDelaySecs );
- + }
- }
- /////////////////////////////////////
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement