diff options
| author | megamage <none@none> | 2009-01-02 10:35:19 -0600 |
|---|---|---|
| committer | megamage <none@none> | 2009-01-02 10:35:19 -0600 |
| commit | 3deefb9f00201033728d4467180d8ba9aa265a20 (patch) | |
| tree | dcd243f7f2f27f03e8c1f1d74e42aac332e508d8 /src/game | |
| parent | 75f0da72eea3ab2f8a6b5a2a9bc8361c4a656afe (diff) | |
| parent | deac8370d71c0f72b5d60709c09dc2830c1680bd (diff) | |
*Update to Trinity 759.
--HG--
branch : trunk
Diffstat (limited to 'src/game')
| -rw-r--r-- | src/game/Chat.cpp | 1 | ||||
| -rw-r--r-- | src/game/Chat.h | 1 | ||||
| -rw-r--r-- | src/game/LootMgr.cpp | 3 | ||||
| -rw-r--r-- | src/game/Map.cpp | 4 | ||||
| -rw-r--r-- | src/game/Spell.cpp | 5 | ||||
| -rw-r--r-- | src/game/SpellAuras.cpp | 7 | ||||
| -rw-r--r-- | src/game/Unit.cpp | 5 | ||||
| -rw-r--r-- | src/game/World.h | 1 |
8 files changed, 22 insertions, 5 deletions
diff --git a/src/game/Chat.cpp b/src/game/Chat.cpp index fedcd982a35..1d45afef5ea 100644 --- a/src/game/Chat.cpp +++ b/src/game/Chat.cpp @@ -61,6 +61,7 @@ ChatCommand * ChatHandler::getCommandTable() static ChatCommand serverSetCommandTable[] = { { "loglevel", SEC_CONSOLE, true, &ChatHandler::HandleServerSetLogLevelCommand, "", NULL }, + { "difftime", SEC_CONSOLE, true, &ChatHandler::HandleServerSetDiffTimeCommand, "", NULL }, { "motd", SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerSetMotdCommand, "", NULL }, { NULL, 0, false, NULL, "", NULL } }; diff --git a/src/game/Chat.h b/src/game/Chat.h index a3ce666541b..fa6c885bed3 100644 --- a/src/game/Chat.h +++ b/src/game/Chat.h @@ -288,6 +288,7 @@ class ChatHandler bool HandleServerRestartCommand(const char* args); bool HandleServerSetMotdCommand(const char* args); bool HandleServerSetLogLevelCommand(const char* args); + bool HandleServerSetDiffTimeCommand(const char* args); bool HandleServerShutDownCommand(const char* args); bool HandleServerShutDownCancelCommand(const char* args); diff --git a/src/game/LootMgr.cpp b/src/game/LootMgr.cpp index 61c626a544c..90162a213d7 100644 --- a/src/game/LootMgr.cpp +++ b/src/game/LootMgr.cpp @@ -778,8 +778,7 @@ LootStoreItem const * LootTemplate::LootGroup::Roll() const return &ExplicitlyChanced[i]; ItemPrototype const *pProto = objmgr.GetItemPrototype(ExplicitlyChanced[i].itemid); - float qualityMultiplier = pProto ? sWorld.getRate(qualityToRate[pProto->Quality]) : 1.0f; - Roll -= ExplicitlyChanced[i].chance * qualityMultiplier; + Roll -= ExplicitlyChanced[i].chance; if (Roll < 0) return &ExplicitlyChanced[i]; } diff --git a/src/game/Map.cpp b/src/game/Map.cpp index 802b0f7feec..b973a8cb11e 100644 --- a/src/game/Map.cpp +++ b/src/game/Map.cpp @@ -1778,7 +1778,9 @@ bool InstanceMap::Add(Player *player) { sLog.outError("InstanceMap::Add: player %s(%d) is being put in instance %d,%d,%d,%d,%d,%d but he is in group %d and is bound to instance %d,%d,%d,%d,%d,%d!", player->GetName(), player->GetGUIDLow(), mapSave->GetMapId(), mapSave->GetInstanceId(), mapSave->GetDifficulty(), mapSave->GetPlayerCount(), mapSave->GetGroupCount(), mapSave->CanReset(), GUID_LOPART(pGroup->GetLeaderGUID()), playerBind->save->GetMapId(), playerBind->save->GetInstanceId(), playerBind->save->GetDifficulty(), playerBind->save->GetPlayerCount(), playerBind->save->GetGroupCount(), playerBind->save->CanReset()); if(groupBind) sLog.outError("InstanceMap::Add: the group is bound to instance %d,%d,%d,%d,%d,%d", groupBind->save->GetMapId(), groupBind->save->GetInstanceId(), groupBind->save->GetDifficulty(), groupBind->save->GetPlayerCount(), groupBind->save->GetGroupCount(), groupBind->save->CanReset()); - player->UnbindInstance(GetId(), GetSpawnMode()); + sLog.outError("InstanceMap::Add: do not let player %s enter instance otherwise crash will happen", player->GetName()); + return false; + //player->UnbindInstance(GetId(), GetSpawnMode()); //assert(false); } // bind to the group or keep using the group save diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 1267d2b28aa..f4bb7eeebb6 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -1004,6 +1004,11 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target) { m_caster->CombatStart(unit); } + else if(spellmgr.GetSpellCustomAttr(m_spellInfo->Id) & SPELL_ATTR_CU_AURA_CC) + { + if(!unit->IsStandState()) + unit->SetStandState(PLAYER_STATE_NONE); + } } } diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 91b85df1a39..282fc4bc095 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -5956,6 +5956,13 @@ void Aura::PeriodicTick() int32 gain = pCaster->ModifyPower(power,gain_amount); m_target->AddThreat(pCaster, float(gain) * 0.5f, GetSpellSchoolMask(GetSpellProto()), GetSpellProto()); } + // Mark of Kaz'rogal + if(GetId() == 31447 && m_target->GetPower(power) == 0) + { + m_target->CastSpell(m_target, 31463, true, 0, this); + // Remove aura + SetAuraDuration(0); + } break; } case SPELL_AURA_PERIODIC_ENERGIZE: diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 5526e3a7002..93cfb963b00 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -7612,7 +7612,8 @@ uint32 Unit::SpellHealingBonus(SpellEntry const *spellProto, uint32 healamount, if (spellProto->Id == 15290 || spellProto->Id == 39373 || spellProto->Id == 33778 || spellProto->Id == 379 || spellProto->Id == 38395 || spellProto->Id == 40972 || - spellProto->Id == 22845 || spellProto->Id == 33504) + spellProto->Id == 22845 || spellProto->Id == 33504 || + spellProto->Id == 34299) return healamount; int32 AdvertisedBenefit = SpellBaseHealingBonus(GetSpellSchoolMask(spellProto)); @@ -8238,7 +8239,7 @@ void Unit::SetInCombatWith(Unit* enemy) void Unit::CombatStart(Unit* target) { - if(!target->IsStandState() && !target->hasUnitState(UNIT_STAT_STUNNED)) + if(!target->IsStandState()/* && !target->hasUnitState(UNIT_STAT_STUNNED)*/) target->SetStandState(PLAYER_STATE_NONE); //Call creature group update diff --git a/src/game/World.h b/src/game/World.h index 756343064ed..977e0aef173 100644 --- a/src/game/World.h +++ b/src/game/World.h @@ -422,6 +422,7 @@ class World uint32 GetUptime() const { return uint32(m_gameTime - m_startTime); } /// Update time uint32 GetUpdateTime() const { return m_updateTime; } + void SetRecordDiffInterval(int32 t) { if(t >= 0) m_configs[CONFIG_INTERVAL_LOG_UPDATE] = (uint32)t; } /// Get the maximum skill level a player can reach uint16 GetConfigMaxSkillValue() const |
