diff options
| author | Rat <gmstreetrat@gmail.com> | 2011-11-20 18:39:20 +0100 |
|---|---|---|
| committer | Rat <gmstreetrat@gmail.com> | 2011-11-20 18:39:20 +0100 |
| commit | 7f8193abf1c9339477038780e56a8ef674cfd5e6 (patch) | |
| tree | f9111f50b5e3b68a6b596845622425cae352c5b9 /src/server/scripts | |
| parent | 27afb1acd4090b45b00cfbd28f0eb29c7e2cf012 (diff) | |
| parent | eb190eb0bc99cf3011ed4d7a30df5898b29aa441 (diff) | |
Merge branch 'master' of github.com:TrinityCore/TrinityCore
Diffstat (limited to 'src/server/scripts')
| -rw-r--r-- | src/server/scripts/Commands/cs_tele.cpp | 23 | ||||
| -rw-r--r-- | src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp | 4 |
2 files changed, 25 insertions, 2 deletions
diff --git a/src/server/scripts/Commands/cs_tele.cpp b/src/server/scripts/Commands/cs_tele.cpp index 85e0ff2390b..8bfa010463a 100644 --- a/src/server/scripts/Commands/cs_tele.cpp +++ b/src/server/scripts/Commands/cs_tele.cpp @@ -125,6 +125,29 @@ public: if (!handler->extractPlayerTarget(nameStr, &target, &target_guid, &target_name)) return false; + if (strcmp(teleStr, "$home") == 0) // References target's homebind + { + if (target) + target->TeleportTo(target->m_homebindMapId, target->m_homebindX, target->m_homebindY, target->m_homebindZ, target->GetOrientation()); + else + { + QueryResult resultDB = CharacterDatabase.PQuery("SELECT mapId, zoneId, posX, posY, posZ FROM character_homebind WHERE guid = %u", target_guid); + if (resultDB) + { + Field* fieldsDB = resultDB->Fetch(); + uint32 mapId = fieldsDB[0].GetUInt32(); + uint32 zoneId = fieldsDB[1].GetUInt32(); + float posX = fieldsDB[2].GetFloat(); + float posY = fieldsDB[3].GetFloat(); + float posZ = fieldsDB[4].GetFloat(); + + Player::SavePositionInDB(mapId, posX, posY, posZ, 0, zoneId, target_guid); + } + } + + return true; + } + // id, or string, or [name] Shift-click form |color|Htele:id|h[name]|h|r GameTele const* tele = handler->extractGameTeleFromLink(teleStr); if (!tele) diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp index 55211f3f047..dc2d34326a7 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp @@ -130,7 +130,7 @@ public: me->SetHealth(0); me->InterruptNonMeleeSpells(true); me->RemoveAllAuras(); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); me->GetMotionMaster()->MovementExpired(false); me->GetMotionMaster()->MoveIdle(); me->SetStandState(UNIT_STAND_STATE_DEAD); @@ -152,7 +152,7 @@ public: { bIsUndead = true; bEventInProgress = false; - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); me->UpdateEntry(MOB_INGVAR_UNDEAD); me->SetInCombatWith(me->getVictim()); me->GetMotionMaster()->MoveChase(me->getVictim()); |
