Merge remote-tracking branch 'origin/master' into 4.3.4
Conflicts: src/server/game/Entities/Unit/Unit.cpp src/server/game/Quests/QuestDef.h
This commit is contained in:
commit
81fee56bfe
7 files changed
+69
-20
No files matched your search
@@ -0,0 +1,2 @@
|
||||
-- DB/SAI: correct some issues with Eliza's Grave Dirt Previous Commit
|
||||
UPDATE `smart_scripts` SET `event_param1`=15,`event_param2`=100 WHERE `entryorguid`=314 AND `source_type`=0 AND `id`=13;
|
||||
@@ -0,0 +1,40 @@
|
||||
-- Add support for quest: http://www.wowhead.com/quest=12152
|
||||
-- Indexes
|
||||
-- TO DO: Add spawns with "Place Offering" Effect 1 - send event for the npc that come after ward summon Jin'Jarrack, also put his spawn in that spell, if anyone ever do it
|
||||
SET @OFFERING_BUNNY := 27200;
|
||||
SET @OFFERING_TARGET_BUNNY := 27201;
|
||||
SET @JIN_ARRAK := 27199;
|
||||
SET @SCRIPT := @JIN_ARRAK * 100;
|
||||
|
||||
-- Template updates
|
||||
UPDATE `creature_template` SET `AIName`='SmartAI',`unit_flags`=unit_flags|0x00000100|0x00000200,`faction_A`=14,`faction_H`=14 WHERE `entry`=@JIN_ARRAK;
|
||||
UPDATE `creature_template` SET `unit_flags`=unit_flags|0x00000100|0x02000000,`flags_extra`=0x00000080,`AIName`='SmartAI' WHERE `entry`=@OFFERING_BUNNY;
|
||||
UPDATE `creature_template` SET `unit_flags`=unit_flags|0x00000100|0x02000000,`flags_extra`=0x00000080 WHERE `entry`=@OFFERING_TARGET_BUNNY;
|
||||
|
||||
-- SAI support
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@OFFERING_BUNNY,@JIN_ARRAK) AND `source_type`=0;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=@SCRIPT AND `source_type`=9;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
|
||||
(@OFFERING_BUNNY,0,0,1,54,0,100,0,0,0,0,0,11,48059,0,0,0,0,0,1,0,0,0,0,0,0,0,'Offering Bunny - On just summoned - Cast spell that send event'),
|
||||
(@OFFERING_BUNNY,0,1,2,61,0,100,0,0,0,0,0,11,48194,0,0,0,0,0,0,0,0,0,0,0,0,0,'Offering Bunny - Linked - Cast kill credit spell'),
|
||||
(@OFFERING_BUNNY,0,2,0,61,0,100,0,0,0,0,0,12,@JIN_ARRAK,3,30000,0,0,0,8,0,0,0,4678.617,-4859.459,35.56327,3.124139,'Offering Bunny - Linked - Summon Jin''Arrack [need to be put in the spell event, when all rest are added]'),
|
||||
(@JIN_ARRAK,0,0,1,54,0,100,0,0,0,0,0,11,17327,0,0,0,0,0,1,0,0,0,0,0,0,0,'Warlord Jin''Arrak - On just summoned - Cast Spirit Particles on self'),
|
||||
(@JIN_ARRAK,0,1,2,61,0,100,0,0,0,0,0,5,15,0,0,0,0,0,1,0,0,0,0,0,0,0,'Warlord Jin''Arrak - Linked - Play emote roar'),
|
||||
(@JIN_ARRAK,0,2,0,61,0,100,0,0,0,0,0,80,@SCRIPT,2,0,0,0,0,1,0,0,0,0,0,0,0,'Warlord Jin''Arrak - Linked - Start actionlist'),
|
||||
(@SCRIPT,9,0,0,0,0,100,0,1500,1500,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Warlord Jin''Arrak - Action 0 - Say 0'),
|
||||
(@SCRIPT,9,1,0,0,0,100,0,1000,1000,0,0,11,48060,0,0,0,0,0,19,@OFFERING_BUNNY,0,0,0,0,0,0,'Warlord Jin''Arrak - Action 1 - Cast feed'),
|
||||
(@SCRIPT,9,2,0,0,0,100,0,0,0,0,0,11,31951,0,0,0,0,0,1,0,0,0,0,0,0,0,'Warlord Jin''Arrak - Action 2 - Cast super particle on self'),
|
||||
(@SCRIPT,9,3,0,0,0,100,0,7000,7000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Warlord Jin''Arrak - Action 3 - Say 2'),
|
||||
(@SCRIPT,9,4,0,0,0,100,0,100,100,0,0,90,7,0,0,0,0,0,1,0,0,0,0,0,0,0,'Warlord Jin''Arrak - Action 4 - Set field_byte_1 to 7');
|
||||
|
||||
-- Texts
|
||||
DELETE FROM `creature_text` WHERE `entry`=@JIN_ARRAK;
|
||||
INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
|
||||
(@JIN_ARRAK,0,0,'Finally, a worthy offering!',41,0,100,15,0,0, 'Warlord Jin''Arrak'),
|
||||
(@JIN_ARRAK,1,0,'Ahhh! What be happenin'' to me, mon?',41,0,100,0,0,0, 'Warlord Jin''Arrak');
|
||||
|
||||
-- Conditions
|
||||
DELETE FROM `conditions` WHERE `SourceEntry`=48194 AND `SourceTypeOrReferenceId`=13;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
|
||||
(13,1,48194,0,0,32,0,144,0,0,0,0,'', 'Jin''Arrak quest kill credit can hit only players'),
|
||||
(13,1,48194,0,0,9,0,12152,0,0,0,0,'', 'Jin''Arrak quest kill credit hit target must be on quest Jin''Arrak end');
|
||||
@@ -16065,7 +16065,7 @@ void Player::KilledMonsterCredit(uint32 entry, uint64 guid)
|
||||
continue;
|
||||
// just if !ingroup || !noraidgroup || raidgroup
|
||||
QuestStatusData& q_status = m_QuestStatus[questid];
|
||||
if (q_status.Status == QUEST_STATUS_INCOMPLETE && (!GetGroup() || !GetGroup()->isRaidGroup() || qInfo->IsAllowedInRaid()))
|
||||
if (q_status.Status == QUEST_STATUS_INCOMPLETE && (!GetGroup() || !GetGroup()->isRaidGroup() || qInfo->IsAllowedInRaid(GetMap()->GetDifficulty())))
|
||||
{
|
||||
if (qInfo->HasSpecialFlag(QUEST_SPECIAL_FLAGS_KILL_OR_CAST))
|
||||
{
|
||||
@@ -16120,7 +16120,7 @@ void Player::KilledPlayerCredit()
|
||||
continue;
|
||||
// just if !ingroup || !noraidgroup || raidgroup
|
||||
QuestStatusData& q_status = m_QuestStatus[questid];
|
||||
if (q_status.Status == QUEST_STATUS_INCOMPLETE && (!GetGroup() || !GetGroup()->isRaidGroup() || qInfo->IsAllowedInRaid()))
|
||||
if (q_status.Status == QUEST_STATUS_INCOMPLETE && (!GetGroup() || !GetGroup()->isRaidGroup() || qInfo->IsAllowedInRaid(GetMap()->GetDifficulty())))
|
||||
{
|
||||
if (qInfo->HasSpecialFlag(QUEST_SPECIAL_FLAGS_PLAYER_KILL))
|
||||
{
|
||||
@@ -16388,7 +16388,7 @@ bool Player::HasQuestForItem(uint32 itemid) const
|
||||
continue;
|
||||
|
||||
// hide quest if player is in raid-group and quest is no raid quest
|
||||
if (GetGroup() && GetGroup()->isRaidGroup() && !qinfo->IsAllowedInRaid())
|
||||
if (GetGroup() && GetGroup()->isRaidGroup() && !qinfo->IsAllowedInRaid(GetMap()->GetDifficulty()))
|
||||
if (!InBattleground()) //there are two ways.. we can make every bg-quest a raidquest, or add this code here.. i don't know if this can be exploited by other quests, but i think all other quests depend on a specific area.. but keep this in mind, if something strange happens later
|
||||
continue;
|
||||
|
||||
@@ -23144,7 +23144,7 @@ bool Player::HasQuestForGO(int32 GOId) const
|
||||
if (!qinfo)
|
||||
continue;
|
||||
|
||||
if (GetGroup() && GetGroup()->isRaidGroup() && !qinfo->IsAllowedInRaid())
|
||||
if (GetGroup() && GetGroup()->isRaidGroup() && !qinfo->IsAllowedInRaid(GetMap()->GetDifficulty()))
|
||||
continue;
|
||||
|
||||
for (uint8 j = 0; j < QUEST_OBJECTIVES_COUNT; ++j)
|
||||
|
||||
@@ -16695,7 +16695,6 @@ void Unit::SendTeleportPacket(Position& pos)
|
||||
data.WriteBit(transGuid[6]);
|
||||
data.WriteBit(transGuid[4]);
|
||||
}
|
||||
|
||||
data.WriteBit(guid[4]);
|
||||
data.WriteBit(guid[7]);
|
||||
data.WriteBit(guid[5]);
|
||||
@@ -16731,7 +16730,6 @@ void Unit::SendTeleportPacket(Position& pos)
|
||||
Relocate(&pos);
|
||||
else
|
||||
Relocate(&oldPos);
|
||||
|
||||
SendMessageToSet(&data, true);
|
||||
}
|
||||
|
||||
|
||||
@@ -474,16 +474,8 @@ void WorldSession::HandleQuestConfirmAccept(WorldPacket& recvData)
|
||||
if (!pOriginalPlayer)
|
||||
return;
|
||||
|
||||
if (quest->IsRaidQuest())
|
||||
{
|
||||
if (!_player->IsInSameRaidWith(pOriginalPlayer))
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!_player->IsInSameGroupWith(pOriginalPlayer))
|
||||
return;
|
||||
}
|
||||
if (!_player->IsInSameRaidWith(pOriginalPlayer))
|
||||
return;
|
||||
|
||||
if (_player->CanAddQuest(quest, true))
|
||||
_player->AddQuest(quest, NULL); // NULL, this prevent DB script from duplicate running
|
||||
|
||||
@@ -328,9 +328,26 @@ bool Quest::IsAutoComplete() const
|
||||
return sWorld->getBoolConfig(CONFIG_QUEST_IGNORE_AUTO_COMPLETE) ? false : (Method == 0 || HasFlag(QUEST_FLAGS_AUTOCOMPLETE));
|
||||
}
|
||||
|
||||
bool Quest::IsAllowedInRaid() const
|
||||
bool Quest::IsRaidQuest(Difficulty difficulty) const
|
||||
{
|
||||
if (IsRaidQuest())
|
||||
switch (Type)
|
||||
{
|
||||
case QUEST_TYPE_RAID:
|
||||
return true;
|
||||
case QUEST_TYPE_RAID_10:
|
||||
return !(difficulty & RAID_DIFFICULTY_MASK_25MAN);
|
||||
case QUEST_TYPE_RAID_25:
|
||||
return difficulty & RAID_DIFFICULTY_MASK_25MAN;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Quest::IsAllowedInRaid(Difficulty difficulty) const
|
||||
{
|
||||
if (IsRaidQuest(difficulty))
|
||||
return true;
|
||||
|
||||
return sWorld->getBoolConfig(CONFIG_QUEST_IGNORE_RAID);
|
||||
|
||||
@@ -291,8 +291,8 @@ class Quest
|
||||
bool IsMonthly() const { return Flags & QUEST_SPECIAL_FLAGS_MONTHLY; }
|
||||
bool IsSeasonal() const { return (ZoneOrSort == -QUEST_SORT_SEASONAL || ZoneOrSort == -QUEST_SORT_SPECIAL || ZoneOrSort == -QUEST_SORT_LUNAR_FESTIVAL || ZoneOrSort == -QUEST_SORT_MIDSUMMER || ZoneOrSort == -QUEST_SORT_BREWFEST || ZoneOrSort == -QUEST_SORT_LOVE_IS_IN_THE_AIR || ZoneOrSort == -QUEST_SORT_NOBLEGARDEN) && !IsRepeatable(); }
|
||||
bool IsDailyOrWeekly() const { return Flags & (QUEST_FLAGS_DAILY | QUEST_FLAGS_WEEKLY); }
|
||||
bool IsRaidQuest() const { return Type == QUEST_TYPE_RAID || Type == QUEST_TYPE_RAID_10 || Type == QUEST_TYPE_RAID_25; }
|
||||
bool IsAllowedInRaid() const;
|
||||
bool IsRaidQuest(Difficulty difficulty) const;
|
||||
bool IsAllowedInRaid(Difficulty difficulty) const;
|
||||
bool IsDFQuest() const { return SpecialFlags & QUEST_SPECIAL_FLAGS_DF_QUEST; }
|
||||
uint32 CalculateHonorGain(uint8 level) const;
|
||||
|
||||
|
||||
Reference in new issue
Block a user