ArcEmu: Worldmap_info Required Quests - ArcEmu

Jump to content

Toggle shoutbox Lastest Announcements

dfighter  : (07 December 2014 - 12:06 PM) Arcemu is in hibernation mode, please read http://arcemu.org/fo...showtopic=26903
dfighter  : (01 January 2013 - 05:56 PM) Arcemu wishes you all a happy new year!
Hasbro  : (12 September 2012 - 10:01 AM) Please excuse our outage from the web! Our web host had a major malfunction!
dfighter  : (01 September 2012 - 04:05 PM) Since the spam bots just don't want to stop, I've enabled admin verification when registering.
dfighter  : (23 January 2012 - 09:56 PM) Please note that from now on you will need to confirm your email on the wiki in order to edit it!
Hasbro  : (31 December 2011 - 12:50 PM) Happy New Years all!
Navid  : (26 December 2011 - 04:09 AM) Merry Christmas !!!!!! Happy holidays all :)
WAmadeus  : (24 December 2011 - 03:54 PM) Merry Christmas to all!
dfighter  : (24 December 2011 - 11:05 AM) The Arcemu team wishes y'all a Merry Christmukkah!
Hasbro  : (05 October 2011 - 12:53 PM) Looking for web designers for upcoming web related project. If you're interested in designing user interfaces contact me
dfighter  : (02 September 2011 - 03:47 PM) So who here wants vehicles in Arcemu? :P http://arcemu.org/fo...showtopic=25440
Hasbro  : (14 August 2011 - 03:25 PM) Join us on irc, grab an irc client and connect to irc.freenode.net join channel #arcemu /server irc.freenode.net:6667 /join #arcemu
jackpoz  : (03 August 2011 - 05:33 AM) to all Lua Engine (old one) users: please check http://arcemu.org/fo...showtopic=25274
Hasbro  : (20 May 2011 - 05:27 PM) Looking for people experienced with CMake configuration and setup! Contact me asap
Hasbro  : (15 May 2011 - 05:03 PM) ArcEmu is recruiting C++ programmers, contact Hasbro if interested.
paroxysm  : (03 May 2011 - 06:26 PM) Updated luabridge gossip example to describe the whole gossip creation process rather than just how to create menu. Gossip tutorial
paroxysm  : (23 April 2011 - 11:35 AM) Lua writers can refer to the Luabridge Tutorials section in the Wiki to learn how to write gossip code correctly.
Hasbro  : (20 April 2011 - 05:22 PM) Thank you for your continuous contribution of bug reports, we are working on them.
Hasbro  : (17 April 2011 - 03:20 AM) Please consider donating to support our bills. Donations can be sent using PayPal to donations@arcemu.org - Thank you for your support.
paroxysm  : (10 April 2011 - 12:43 AM) Refer to the Luabridge Tutorials section in the Wiki to learn the new syntax of luabridge.
Resize Shouts Area

Read:

When submitting patches - READ: http://arcemu.org/fo...?showtopic=2355 -
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Worldmap_info Required Quests

#1 User is offline   Satanail 

  • Enthusiast
  • PipPipPip
  • Group: Members
  • Posts: 150
  • Joined: 11-March 12
  • Gender:Male
  • Location:Absurdistan
  • Server OS:Windows

Posted 06 April 2012 - 10:32 AM

Hi there.
In 3.3.2 there where 3 new dungeons, added. 2 of them (Pit of Saron and Halls of Reflection) have required quests, that are different for alliance and horde players. And at the moment, the data about quest needed to access selected map is stored in just one column in worldmap_info, - column "required_quest". This makes the blizzlike working of these dungeons and the linked to them quest chains impossible. I modified the worldmap_info structure to have 2 columns: required_quest_A - required quests just for allaince faction and required_quest_H - just for horde faction. Dungeons or raids, that have one required quest for both factions can just have identical value in both required_quest_A and required_quest_H. Also edited the core to support the changes.

Patch file: 0002-worldmap_info_quests.patch
From 3f5b9ca298ffc3bc2db4483618d4b637fcac5f9c Mon Sep 17 00:00:00 2001
From: DarkAngel39 <darkangel39@CC-win-desktop.(none)>
Date: Fri, 6 Apr 2012 14:52:59 +0300
Subject: [PATCH] worldmap_info quest requrements

---
 src/arcemu-world/AreaTrigger.cpp   |   26 +++++++++++++++++++++-----
 src/arcemu-world/ObjectStorage.cpp |    2 +-
 src/arcemu-world/World.h           |    3 ++-
 3 files changed, 24 insertions(+), 7 deletions(-)

diff --git a/src/arcemu-world/AreaTrigger.cpp b/src/arcemu-world/AreaTrigger.cpp
index bd39787..0e17013 100644
--- a/src/arcemu-world/AreaTrigger.cpp
+++ b/src/arcemu-world/AreaTrigger.cpp
@@ -36,7 +36,7 @@
     AREA_TRIGGER_FAILURE_NO_BC			= 2,
     AREA_TRIGGER_FAILURE_NO_HEROIC		= 3,
     AREA_TRIGGER_FAILURE_NO_RAID		= 4,
-    AREA_TRIGGER_FAILURE_NO_ATTUNE_Q	= 5,
+    AREA_TRIGGER_FAILURE_NO_ATTUNE_QA	= 5,
     AREA_TRIGGER_FAILURE_NO_ATTUNE_I	= 6,
     AREA_TRIGGER_FAILURE_LEVEL			= 7,
     AREA_TRIGGER_FAILURE_NO_GROUP		= 8,
@@ -44,6 +44,7 @@
     AREA_TRIGGER_FAILURE_NO_CHECK		= 10,
     AREA_TRIGGER_FAILURE_NO_WOTLK		= 11,
     AREA_TRIGGER_FAILURE_LEVEL_HEROIC	= 12,
+	AREA_TRIGGER_FAILURE_NO_ATTUNE_QH	= 13,
 };
 
 uint32 AreaTriggerFailureMessages[] =
@@ -90,8 +91,11 @@
 	if((pMapInfo->type == INSTANCE_MULTIMODE && pPlayer->iInstanceType >= MODE_HEROIC) && !pPlayer->GetGroup())
 		return AREA_TRIGGER_FAILURE_NO_GROUP;
 
-	if(pMapInfo && pMapInfo->required_quest && !pPlayer->HasFinishedQuest(pMapInfo->required_quest))
-		return AREA_TRIGGER_FAILURE_NO_ATTUNE_Q;
+	if(pPlayer->GetTeam() == TEAM_ALLIANCE && pMapInfo && pMapInfo->required_quest_A && !pPlayer->HasFinishedQuest(pMapInfo->required_quest_A))
+		return AREA_TRIGGER_FAILURE_NO_ATTUNE_QA;
+	
+	if(pPlayer->GetTeam() == TEAM_HORDE && pMapInfo && pMapInfo->required_quest_H && !pPlayer->HasFinishedQuest(pMapInfo->required_quest_H))
+		return AREA_TRIGGER_FAILURE_NO_ATTUNE_QH;
 
 	if(pMapInfo && pMapInfo->required_item && !pPlayer->GetItemInterface()->GetItemCount(pMapInfo->required_item, true))
 		return AREA_TRIGGER_FAILURE_NO_ATTUNE_I;
@@ -183,10 +187,22 @@
 									data << msg;
 								}
 								break;
-							case AREA_TRIGGER_FAILURE_NO_ATTUNE_Q:
+							case AREA_TRIGGER_FAILURE_NO_ATTUNE_QA:
 								{
 									MapInfo* pMi = WorldMapInfoStorage.LookupEntry(pAreaTrigger->Mapid);
-									Quest* pQuest = QuestStorage.LookupEntry(pMi->required_quest);
+									Quest* pQuest = QuestStorage.LookupEntry(pMi->required_quest_A);
+									if(pQuest)
+										snprintf(msg, 200, GetPlayer()->GetSession()->LocalizedWorldSrv(35), pQuest->title);
+									else
+										snprintf(msg, 200, "%s", GetPlayer()->GetSession()->LocalizedWorldSrv(36));
+
+									data << msg;
+								}
+								break;
+							case AREA_TRIGGER_FAILURE_NO_ATTUNE_QH:
+								{
+									MapInfo* pMi = WorldMapInfoStorage.LookupEntry(pAreaTrigger->Mapid);
+									Quest* pQuest = QuestStorage.LookupEntry(pMi->required_quest_H);
 									if(pQuest)
 										snprintf(msg, 200, GetPlayer()->GetSession()->LocalizedWorldSrv(35), pQuest->title);
 									else
diff --git a/src/arcemu-world/ObjectStorage.cpp b/src/arcemu-world/ObjectStorage.cpp
index 4bb88b4..8ad2cf6 100644
--- a/src/arcemu-world/ObjectStorage.cpp
+++ b/src/arcemu-world/ObjectStorage.cpp
@@ -38,7 +38,7 @@
 const char* gTeleportCoordFormat						= "uxufffx";
 const char* gPvPAreaFormat								= "ush";
 const char* gFishingFormat								= "uuu";
-const char* gWorldMapInfoFormat						= "uuuuuufffusuuuuuuufu";
+const char* gWorldMapInfoFormat						= "uuuuuufffusuuuuuuuufu";
 const char* gZoneGuardsFormat							= "uuu";
 const char* gUnitModelSizeFormat						= "ufu";
 const char* gWorldStringTableFormat					= "us";  // p2wow added [for worldserver common message storage]
diff --git a/src/arcemu-world/World.h b/src/arcemu-world/World.h
index 3d2e109..d72a9b7 100644
--- a/src/arcemu-world/World.h
+++ b/src/arcemu-world/World.h
@@ -142,7 +142,8 @@
 	uint32 flags;
 	uint32 cooldown;
 	uint32 lvl_mod_a;
-	uint32 required_quest;
+	uint32 required_quest_A;
+	uint32 required_quest_H;
 	uint32 required_item;
 	uint32 heroic_key_1;
 	uint32 heroic_key_2;
-- 
1.7.9.msysgit.0


SQL patch:
ALTER TABLE `worldmap_info` CHANGE `required_quest` `required_quest_A` INT(10) UNSIGNED DEFAULT '0' NOT NULL;
ALTER TABLE `worldmap_info` ADD `required_quest_H` INT(10) UNSIGNED DEFAULT '0' NULL AFTER `required_quest_A`;
UPDATE `worldmap_info` SET `required_quest_H` = `required_quest_A`;
UPDATE `worldmap_info` SET  `required_quest_A` = '24710', `required_quest_H` = '24712' WHERE `entry` = '668';
UPDATE `worldmap_info` SET, `required_quest_A` = '24499', `required_quest_H` = '24511' WHERE `entry` = '658';

Attached File(s)


0

#2 User is offline   dfighter 

  • Titles are overrated
  • PipPipPipPipPipPipPipPipPipPip
  • Group: Administrator
  • Posts: 5,189
  • Joined: 14-June 08
  • IRC:dfighter
  • Gender:Male
  • Server OS:Linux

Posted 06 April 2012 - 12:12 PM

If you could put this into a pull request that would be much appreciated, and also please leave the actual data out of the struct update.
Thanks!
"The demand for free goods is infinite."
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users