mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-17 16:10:49 +01:00
*HG 681.
--HG-- branch : trunk
This commit is contained in:
@@ -3,11 +3,6 @@ CREATE TABLE `saved_variables` (
|
||||
`NextArenaPointDistributionTime` bigint(40) UNSIGNED NOT NULL DEFAULT '0'
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Variable Saves';
|
||||
|
||||
ALTER TABLE arena_team_member CHANGE games_week played_week int(10) unsigned NOT NULL default '0';
|
||||
ALTER TABLE arena_team_member CHANGE wins_week wons_week int(10) unsigned NOT NULL default '0';
|
||||
ALTER TABLE arena_team_member CHANGE games_season played_season int(10) unsigned NOT NULL default '0';
|
||||
ALTER TABLE arena_team_member CHANGE wins_season wons_season int(10) unsigned NOT NULL default '0';
|
||||
|
||||
ALTER TABLE `arena_team_member` DROP COLUMN `points_to_add`;
|
||||
ALTER TABLE `arena_team_member` ADD COLUMN `personal_rating` int(10) UNSIGNED NOT NULL DEFAULT '0';
|
||||
ALTER TABLE `characters` ADD COLUMN `arena_pending_points` int(10) UNSIGNED NOT NULL default '0' AFTER `taxi_path`;
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
ALTER TABLE characters
|
||||
CHANGE COLUMN gmstate extra_flags int(11) unsigned NOT NULL default '0';
|
||||
@@ -163,4 +163,4 @@ INSERT INTO `spell_script_target` VALUES
|
||||
(46852,0,181605), -- Ribbon Pole Music
|
||||
(46896,0,181605),
|
||||
(47104,1,26401),
|
||||
(49058,1,24968); -- Rocket Bot Attack
|
||||
(49058,1,24968); -- Rocket Bot Attack
|
||||
|
||||
1
sql/updates/678_world_scripts.sql
Normal file
1
sql/updates/678_world_scripts.sql
Normal file
@@ -0,0 +1 @@
|
||||
update creature_template set scriptname='npc_deathstalker_erland' where entry=1978;
|
||||
@@ -17,15 +17,17 @@
|
||||
/* ScriptData
|
||||
SDName: Silverpine_Forest
|
||||
SD%Complete: 100
|
||||
SDComment: Quest support: 1886
|
||||
SDComment: Quest support: 1886, 435
|
||||
SDCategory: Silverpine Forest
|
||||
EndScriptData */
|
||||
|
||||
/* ContentData
|
||||
npc_astor_hadren
|
||||
npc_deathstalker_erland
|
||||
EndContentData */
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "../../npc/npc_escortAI.h"
|
||||
|
||||
/*######
|
||||
## npc_astor_hadren
|
||||
@@ -83,6 +85,128 @@ bool GossipSelect_npc_astor_hadren(Player *player, Creature *_Creature, uint32 s
|
||||
return true;
|
||||
}
|
||||
|
||||
/*######
|
||||
## npc_deathstalker_erland
|
||||
######*/
|
||||
|
||||
#define SAY_QUESTACCEPT "Let's get to the others, and keep an eye open for those wolves cutside..."
|
||||
#define SAY_START "Be careful, $N. Those wolves like to hide among the trees."
|
||||
#define SAY_AGGRO_1 "A Mottled Worg attacks!"
|
||||
#define SAY_AGGRO_2 "Beware! I am under attack!"
|
||||
#define SAY_LAST "We're almost there!"
|
||||
|
||||
#define SAY_THANKS "We made it! Thanks, $N. I couldn't have gotten without you."
|
||||
#define SAY_RANE "It's good to see you again, Erland. What is your report?"
|
||||
#define SAY_ANSWER "Masses of wolves are to the east, and whoever lived at Malden's Orchard is gone."
|
||||
#define SAY_MOVE_QUINN "If I am excused, then I'd like to check on Quinn..."
|
||||
|
||||
#define SAY_GREETINGS "Hello, Quinn. How are you faring?"
|
||||
#define SAY_QUINN "I've been better. Ivar the Foul got the better of me..."
|
||||
#define SAY_ON_BYE "Try to take better care of yourself, Quinn. You were lucky this time."
|
||||
|
||||
#define QUEST_ESCORTING 435
|
||||
#define NPC_RANE 1950
|
||||
#define NPC_QUINN 1951
|
||||
|
||||
struct TRINITY_DLL_DECL npc_deathstalker_erlandAI : public npc_escortAI
|
||||
{
|
||||
npc_deathstalker_erlandAI(Creature *c) : npc_escortAI(c) {Reset();}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
|
||||
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch(i)
|
||||
{
|
||||
case 1: DoSay(SAY_START, LANG_UNIVERSAL, player);break;
|
||||
case 13:
|
||||
DoSay(SAY_LAST, LANG_UNIVERSAL, player);
|
||||
((Player*)player)->GroupEventHappens(QUEST_ESCORTING, m_creature);break;
|
||||
case 14: DoSay(SAY_THANKS, LANG_UNIVERSAL, player);break;
|
||||
case 15: {
|
||||
Unit* Rane = FindCreature(NPC_RANE, 20);
|
||||
if(Rane)
|
||||
((Creature*)Rane)->Say(SAY_RANE, LANG_UNIVERSAL, NULL);
|
||||
break;}
|
||||
case 16: DoSay(SAY_ANSWER, LANG_UNIVERSAL, NULL);break;
|
||||
case 17: DoSay(SAY_MOVE_QUINN, LANG_UNIVERSAL, NULL); break;
|
||||
case 24: DoSay(SAY_GREETINGS, LANG_UNIVERSAL, NULL);break;
|
||||
case 25: {
|
||||
Unit* Quinn = FindCreature(NPC_QUINN, 20);
|
||||
if(Quinn)
|
||||
((Creature*)Quinn)->Say(SAY_QUINN, LANG_GUTTERSPEAK, NULL);
|
||||
break;}
|
||||
case 26: DoSay(SAY_ON_BYE, LANG_UNIVERSAL, NULL);break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void Reset() {}
|
||||
|
||||
void Aggro(Unit* who)
|
||||
{
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0: DoSay(SAY_AGGRO_1, LANG_UNIVERSAL, who);break;
|
||||
case 1: DoSay(SAY_AGGRO_2, LANG_UNIVERSAL, who);break;
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
}
|
||||
};
|
||||
|
||||
bool QuestAccept_npc_deathstalker_erland(Player* player, Creature* creature, Quest const* quest)
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_ESCORTING)
|
||||
{
|
||||
creature->Say(SAY_QUESTACCEPT, LANG_UNIVERSAL, player->GetGUID());
|
||||
((npc_escortAI*)(creature->AI()))->Start(true, true, false, player->GetGUID());
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
CreatureAI* GetAI_npc_deathstalker_erlandAI(Creature *_Creature)
|
||||
{
|
||||
npc_deathstalker_erlandAI* deathstalker_erlandAI = new npc_deathstalker_erlandAI(_Creature);
|
||||
|
||||
deathstalker_erlandAI->AddWaypoint(0, 1406.32, 1083.10, 52.55);
|
||||
deathstalker_erlandAI->AddWaypoint(1, 1400.49, 1080.42, 52.50); //first say
|
||||
deathstalker_erlandAI->AddWaypoint(2, 1388.48, 1083.10, 52.52);
|
||||
deathstalker_erlandAI->AddWaypoint(3, 1370.16, 1084.02, 52.30);
|
||||
deathstalker_erlandAI->AddWaypoint(4, 1359.02, 1080.85, 52.46);
|
||||
deathstalker_erlandAI->AddWaypoint(5, 1341.43, 1087.39, 52.69);
|
||||
deathstalker_erlandAI->AddWaypoint(6, 1321.93, 1090.51, 50.66);
|
||||
deathstalker_erlandAI->AddWaypoint(7, 1312.98, 1095.91, 47.49);
|
||||
deathstalker_erlandAI->AddWaypoint(8, 1301.09, 1102.94, 47.76);
|
||||
deathstalker_erlandAI->AddWaypoint(9, 1297.73, 1106.35, 50.18);
|
||||
deathstalker_erlandAI->AddWaypoint(10, 1295.49, 1124.32, 50.49);
|
||||
deathstalker_erlandAI->AddWaypoint(11, 1294.84, 1137.25, 51.75);
|
||||
deathstalker_erlandAI->AddWaypoint(12, 1292.89, 1158.99, 52.65);
|
||||
deathstalker_erlandAI->AddWaypoint(13, 1290.75, 1168.67, 52.56, 1000); //complete quest and say last
|
||||
deathstalker_erlandAI->AddWaypoint(14, 1287.12, 1203.49, 52.66, 5000);
|
||||
deathstalker_erlandAI->AddWaypoint(15, 1287.12, 1203.49, 52.66, 4000);
|
||||
deathstalker_erlandAI->AddWaypoint(16, 1287.12, 1203.49, 52.66, 5000);
|
||||
deathstalker_erlandAI->AddWaypoint(17, 1287.12, 1203.49, 52.66, 4000);
|
||||
deathstalker_erlandAI->AddWaypoint(18, 1290.72, 1207.44, 52.69);
|
||||
deathstalker_erlandAI->AddWaypoint(19, 1297.50, 1207.18, 53.74);
|
||||
deathstalker_erlandAI->AddWaypoint(20, 1301.32, 1220.90, 53.74);
|
||||
deathstalker_erlandAI->AddWaypoint(21, 1298.55, 1220.43, 53.74);
|
||||
deathstalker_erlandAI->AddWaypoint(22, 1297.59, 1211.23, 58.47);
|
||||
deathstalker_erlandAI->AddWaypoint(23, 1305.01, 1206.10, 58.51);
|
||||
deathstalker_erlandAI->AddWaypoint(24, 1310.51, 1207.36, 58.51, 5000);
|
||||
deathstalker_erlandAI->AddWaypoint(25, 1310.51, 1207.36, 58.51, 5000);
|
||||
deathstalker_erlandAI->AddWaypoint(26, 1310.51, 1207.36, 58.51, 2000);
|
||||
|
||||
return (CreatureAI*)deathstalker_erlandAI;
|
||||
}
|
||||
|
||||
/*######
|
||||
## AddSC
|
||||
######*/
|
||||
@@ -97,4 +221,10 @@ void AddSC_silverpine_forest()
|
||||
newscript->pGossipSelect = &GossipSelect_npc_astor_hadren;
|
||||
newscript->GetAI = &GetAI_npc_astor_hadren;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name="npc_deathstalker_erland";
|
||||
newscript->GetAI = &GetAI_npc_deathstalker_erlandAI;
|
||||
newscript->pQuestAccept = &QuestAccept_npc_deathstalker_erland;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
|
||||
@@ -653,7 +653,7 @@ bool Map::loaded(const GridPair &p) const
|
||||
}
|
||||
}*/
|
||||
|
||||
void Map::Update(const uint32 &t_diff)
|
||||
void Map::RelocationNotify()
|
||||
{
|
||||
//creatures may be added to the list during update
|
||||
i_lock = true;
|
||||
@@ -666,6 +666,7 @@ void Map::Update(const uint32 &t_diff)
|
||||
continue;
|
||||
CellPair val = Trinity::ComputeCellPair(unit->GetPositionX(), unit->GetPositionY());
|
||||
Cell cell(val);
|
||||
cell.SetNoCreate();
|
||||
//if(unit->GetTypeId() == TYPEID_PLAYER)
|
||||
// PlayerRelocationNotify((Player*)unit, cell, val);
|
||||
//else
|
||||
@@ -693,7 +694,10 @@ void Map::Update(const uint32 &t_diff)
|
||||
}
|
||||
i_unitsToNotify.clear();
|
||||
i_lock = false;
|
||||
}
|
||||
|
||||
void Map::Update(const uint32 &t_diff)
|
||||
{
|
||||
resetMarkedCells();
|
||||
|
||||
//TODO: is there a better way to update activeobjects?
|
||||
@@ -743,7 +747,7 @@ void Map::Update(const uint32 &t_diff)
|
||||
CellPair pair(x,y);
|
||||
Cell cell(pair);
|
||||
cell.data.Part.reserved = CENTER_DISTRICT;
|
||||
cell.SetNoCreate();
|
||||
//cell.SetNoCreate();
|
||||
CellLock<NullGuard> cell_lock(cell, pair);
|
||||
cell_lock->Visit(cell_lock, grid_object_update, *this);
|
||||
cell_lock->Visit(cell_lock, world_object_update, *this);
|
||||
@@ -754,6 +758,8 @@ void Map::Update(const uint32 &t_diff)
|
||||
// UpdateActiveCells((*iter)->GetPositionX(), (*iter)->GetPositionY(), t_diff);
|
||||
}
|
||||
|
||||
RelocationNotify();
|
||||
|
||||
// Don't unload grids if it's battleground, since we may have manually added GOs,creatures, those doesn't load from DB at grid re-load !
|
||||
// This isn't really bother us, since as soon as we have instanced BG-s, the whole map unloads as the BG gets ended
|
||||
if (IsBattleGroundOrArena())
|
||||
|
||||
@@ -259,6 +259,7 @@ class TRINITY_DLL_SPEC Map : public GridRefManager<NGridType>, public Trinity::O
|
||||
void AddActiveObject(WorldObject* obj) { i_activeObjects.insert(obj); }
|
||||
void RemoveActiveObject(WorldObject* obj) { i_activeObjects.erase(obj); }
|
||||
void AddUnitToNotify(Unit* unit);
|
||||
void RelocationNotify();
|
||||
|
||||
void SendToPlayers(WorldPacket const* data) const;
|
||||
|
||||
|
||||
@@ -1190,10 +1190,6 @@ void Aura::TriggerSpell()
|
||||
uint64 originalCasterGUID = GetCasterGUID();
|
||||
|
||||
SpellEntry const *triggeredSpellInfo = sSpellStore.LookupEntry(trigger_spell_id);
|
||||
SpellRangeEntry const* srange = sSpellRangeStore.LookupEntry(triggeredSpellInfo->rangeIndex);
|
||||
if(!GetSpellMaxRange(srange))
|
||||
target = caster; //for druid dispel poison
|
||||
|
||||
SpellEntry const *auraSpellInfo = GetSpellProto();
|
||||
uint32 auraId = auraSpellInfo->Id;
|
||||
|
||||
@@ -1881,6 +1877,8 @@ void Aura::TriggerSpell()
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!GetSpellMaxRange(sSpellRangeStore.LookupEntry(triggeredSpellInfo->rangeIndex)))
|
||||
target = m_target; //for druid dispel poison
|
||||
m_target->CastSpell(target, triggeredSpellInfo, true, 0, this, originalCasterGUID);
|
||||
}
|
||||
|
||||
|
||||
@@ -31,24 +31,6 @@ template<class T>
|
||||
void
|
||||
WaypointMovementGenerator<T>::Initialize(T &u){}
|
||||
|
||||
template<>
|
||||
void
|
||||
WaypointMovementGenerator<Creature>::Initialize(Creature &u)
|
||||
{
|
||||
u.StopMoving();
|
||||
if(!path_id)
|
||||
path_id = u.GetWaypointPath();
|
||||
waypoints = WaypointMgr.GetPath(path_id);
|
||||
if(waypoints && waypoints->size())
|
||||
{
|
||||
Traveller<Creature> traveller(u);
|
||||
node = *(waypoints->at(i_currentNode));
|
||||
InitTraveller(u,node);
|
||||
i_destinationHolder.SetDestination(traveller, node.x, node.y, node.z);
|
||||
i_nextMoveTime.Reset(i_destinationHolder.GetTotalTravelTime());
|
||||
}
|
||||
}
|
||||
|
||||
template<>
|
||||
void
|
||||
WaypointMovementGenerator<Creature>::Finalize(Creature &u){}
|
||||
@@ -108,6 +90,24 @@ void WaypointMovementGenerator<Creature>::InitTraveller(Creature &unit, const Wa
|
||||
unit.addUnitState(UNIT_STAT_ROAMING);
|
||||
}
|
||||
|
||||
template<>
|
||||
void
|
||||
WaypointMovementGenerator<Creature>::Initialize(Creature &u)
|
||||
{
|
||||
u.StopMoving();
|
||||
if(!path_id)
|
||||
path_id = u.GetWaypointPath();
|
||||
waypoints = WaypointMgr.GetPath(path_id);
|
||||
if(waypoints && waypoints->size())
|
||||
{
|
||||
Traveller<Creature> traveller(u);
|
||||
node = *(waypoints->at(i_currentNode));
|
||||
InitTraveller(u,node);
|
||||
i_destinationHolder.SetDestination(traveller, node.x, node.y, node.z);
|
||||
i_nextMoveTime.Reset(i_destinationHolder.GetTotalTravelTime());
|
||||
}
|
||||
}
|
||||
|
||||
template<>
|
||||
void WaypointMovementGenerator<Player>::InitTraveller(Player &unit, const WaypointData &node){}
|
||||
|
||||
|
||||
@@ -900,7 +900,7 @@ GM.StartLevel = 70
|
||||
# Visibility.Distance.Grey.Unit
|
||||
# Visibility grey distance for creatures/players (fast changing objects)
|
||||
# addition to appropriate object type Visibility.Distance.* use in case visibility removing to
|
||||
# object (except corpse around distences) If <EFBFBD> is distance and G is grey distance then object
|
||||
# object (except corpse around distences) If D is distance and G is grey distance then object
|
||||
# make visible if distance to it <= D but make non visible if distance > D+G
|
||||
# Default: 1 (yard)
|
||||
#
|
||||
@@ -1270,4 +1270,4 @@ PvPToken.MapAllowType = 4
|
||||
PvPToken.ItemID = 29434
|
||||
PvPToken.ItemCount = 1
|
||||
NoResetTalentsCost = 0
|
||||
ShowKickInWorld = 0
|
||||
ShowKickInWorld = 0
|
||||
|
||||
Reference in New Issue
Block a user