aboutsummaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
authorn0n4m3 <none@none>2010-04-11 11:23:32 +0400
committern0n4m3 <none@none>2010-04-11 11:23:32 +0400
commitcdec48b9efab92c0af3bb1b96de0b4e8566f5a35 (patch)
treeb76ddc7ab80476156f77008d786fe344c9375feb /src/game
parent7ffc9ef40bd8a832bf14e0202b8da0ec98516725 (diff)
Some fixes for quests/basePoints calculation, realm server.
--HG-- branch : trunk
Diffstat (limited to 'src/game')
-rw-r--r--src/game/GossipDef.cpp6
-rw-r--r--src/game/Unit.cpp22
-rw-r--r--src/game/World.h26
3 files changed, 40 insertions, 14 deletions
diff --git a/src/game/GossipDef.cpp b/src/game/GossipDef.cpp
index d5de4f4c80e..8b41f457edc 100644
--- a/src/game/GossipDef.cpp
+++ b/src/game/GossipDef.cpp
@@ -167,7 +167,7 @@ void PlayerMenu::SendGossipMenu(uint32 TitleTextId, uint64 objectGUID)
data << uint32(questID);
data << uint32(qItem.m_qIcon);
data << uint32(pSession->GetPlayer()->GetQuestLevel(pQuest));
- data << uint32(0); // 3.3.3
+ data << uint32(pQuest->GetFlags()); // 3.3.3 quest flags
data << uint8(0); // 3.3.3 changes icon: blue question or yellow exclamation
std::string Title = pQuest->GetTitle();
@@ -411,8 +411,8 @@ void PlayerMenu::SendQuestGiverQuestList(QEmote eEmote, const std::string& Title
data << uint32(questID);
data << uint32(qmi.m_qIcon);
data << uint32(pSession->GetPlayer()->GetQuestLevel(pQuest));
- data << uint32(0);
- data << uint8(0);
+ data << uint32(pQuest->GetFlags()); // 3.3.3 quest flags
+ data << uint8(0); // 3.3.3 changes icon: blue question or yellow exclamation
data << title;
}
pSession->SendPacket(&data);
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 043dc8cc179..c2c139fcc78 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -12243,18 +12243,22 @@ int32 Unit::CalculateSpellDamage(SpellEntry const* spellProto, uint8 effect_inde
int32 basePoints = int32(effBasePoints + level * basePointsPerLevel);
int32 randomPoints = int32(spellProto->EffectDieSides[effect_index]);
- int32 value = basePoints;
-
- if (randomPoints != 0)
+ switch(randomPoints)
{
- // range can have positive and negative values, so order its for irand
- int32 randvalue = (0 > randomPoints)
- ? irand(randomPoints, 0)
- : irand(0, randomPoints);
+ case 0: break; // not used
+ case 1: basePoints += 1; break; // range 1..1
+ default:
+ // range can have positive (1..rand) and negative (rand..1) values, so order its for irand
+ int32 randvalue = (randomPoints >= 1)
+ ? irand(1, randomPoints)
+ : irand(randomPoints, 1);
- basePoints += randvalue;
+ basePoints += randvalue;
+ break;
}
-
+
+ int32 value = basePoints;
+
// random damage
//if (comboDamage != 0 && unitPlayer /*&& target && (target->GetGUID() == unitPlayer->GetComboTarget())*/)
if (m_movedPlayer)
diff --git a/src/game/World.h b/src/game/World.h
index b1188ba688f..20394ee11f4 100644
--- a/src/game/World.h
+++ b/src/game/World.h
@@ -343,7 +343,21 @@ enum Rates
MAX_RATES
};
-/// Type of server
+/// Can be used in SMSG_AUTH_RESPONSE packet
+enum BillingPlanFlags
+{
+ SESSION_NONE = 0x00,
+ SESSION_UNUSED = 0x01,
+ SESSION_RECURRING_BILL = 0x02,
+ SESSION_FREE_TRIAL = 0x04,
+ SESSION_IGR = 0x08,
+ SESSION_USAGE = 0x10,
+ SESSION_TIME_MIXTURE = 0x20,
+ SESSION_RESTRICTED = 0x40,
+ SESSION_ENABLE_CAIS = 0x80,
+};
+
+/// Type of server, this is values from second column of Cfg_Configs.dbc
enum RealmType
{
REALM_TYPE_NORMAL = 0,
@@ -386,7 +400,15 @@ enum RealmZone
REALM_ZONE_TEST_SERVER = 26, // any language
REALM_ZONE_TOURNAMENT_27 = 27, // basic-Latin at create, any at login
REALM_ZONE_QA_SERVER = 28, // any language
- REALM_ZONE_CN9 = 29 // basic-Latin at create, any at login
+ REALM_ZONE_CN9 = 29, // basic-Latin at create, any at login
+ REALM_ZONE_TEST_SERVER_2 = 30, // any language
+ REALM_ZONE_CN10 = 31, // basic-Latin at create, any at login
+ REALM_ZONE_CTC = 32,
+ REALM_ZONE_CNC = 33,
+ REALM_ZONE_CN1_4 = 34, // basic-Latin at create, any at login
+ REALM_ZONE_CN2_6_9 = 35, // basic-Latin at create, any at login
+ REALM_ZONE_CN3_7 = 36, // basic-Latin at create, any at login
+ REALM_ZONE_CN5_8 = 37 // basic-Latin at create, any at login
};
// DB scripting commands