Skip to content

Commit f53366e

Browse files
Schmoozerdxfurry
authored andcommitted
[s1826] Drop temp CREATURE_FLAG_EXTRA_NO_TALKTO_CREDIT
Also toggle git-id tool to work well with recent milestone (based on commit [12279] - b33c51e)
1 parent e8edacd commit f53366e

8 files changed

+17
-14
lines changed

.gitattributes

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
*.vcproj eol=crlf
44
*.vcxproj* eol=crlf
55

6+
src/shared/revision_nr.h eol=lf
7+
src/shared/revision_sql.h eol=lf
8+
69
# Whitespace rules
710
# strict (no trailing, no tabs)
811
*.cpp whitespace=trailing-space,space-before-tab,tab-in-indent,cr-at-eol

contrib/git_id/git_id.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,14 @@ bool find_sql_updates()
478478

479479
pclose(cmd_pipe);
480480

481+
// Add last milestone's file information
482+
last_sql_rev[0] = 11785;
483+
last_sql_nr[0] = 2;
484+
sscanf("11785_02_characters_instance", "%s", last_sql_update[0]);
485+
last_sql_rev[2] = 10008;
486+
last_sql_nr[2] = 1;
487+
sscanf("10008_01_realmd_realmd_db_version", "%s", last_sql_update[2]);
488+
481489
// remove updates from the last commit also found on origin
482490
snprintf(cmd, MAX_CMD, "git show %s:%s", origin_hash, sql_update_dir);
483491
if ((cmd_pipe = popen(cmd, "r")) == NULL)

sql/mangos.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ DROP TABLE IF EXISTS `db_version`;
2323
CREATE TABLE `db_version` (
2424
`version` varchar(120) default NULL,
2525
`creature_ai_version` varchar(120) default NULL,
26-
`required_s1825_12278_01_mangos_creature_template` bit(1) default NULL
26+
`required_s1826_12279_01_mangos_creature_template` bit(1) default NULL
2727
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes';
2828

2929
--
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ALTER TABLE db_version CHANGE COLUMN required_s1825_12278_01_mangos_creature_template required_s1826_12279_01_mangos_creature_template bit;
2+
3+
UPDATE creature_template SET flags_extra=flags_extra & ~0x800;

src/game/Creature.h

-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ enum CreatureFlagsExtra
5454
CREATURE_FLAG_EXTRA_NOT_TAUNTABLE = 0x00000100, // creature is immune to taunt auras and effect attack me
5555
CREATURE_FLAG_EXTRA_AGGRO_ZONE = 0x00000200, // creature sets itself in combat with zone on aggro
5656
CREATURE_FLAG_EXTRA_GUARD = 0x00000400, // creature is a guard
57-
CREATURE_FLAG_EXTRA_NO_TALKTO_CREDIT = 0x00000800, // creature doesn't give quest-credits when talked to (temporarily flag)
5857
};
5958

6059
// GCC have alternative #pragma pack(N) syntax and old gcc version not support pack(push,N), also any gcc version not support it at some platform

src/game/Player.cpp

-10
Original file line numberDiff line numberDiff line change
@@ -12188,8 +12188,6 @@ void Player::PrepareGossipMenu(WorldObject* pSource, uint32 menuId)
1218812188
if (pMenuItemBounds.first == pMenuItemBounds.second && canSeeQuests)
1218912189
pMenuItemBounds = sObjectMgr.GetGossipMenuItemsMapBounds(0);
1219012190

12191-
bool canTalkToCredit = pSource->GetTypeId() == TYPEID_UNIT;
12192-
1219312191
for (GossipMenuItemsMap::const_iterator itr = pMenuItemBounds.first; itr != pMenuItemBounds.second; ++itr)
1219412192
{
1219512193
bool hasMenuItem = true;
@@ -12216,8 +12214,6 @@ void Player::PrepareGossipMenu(WorldObject* pSource, uint32 menuId)
1221612214
switch (itr->second.option_id)
1221712215
{
1221812216
case GOSSIP_OPTION_GOSSIP:
12219-
if (itr->second.action_menu_id != 0) // has sub menu (or close gossip), so do not "talk" with this NPC yet
12220-
canTalkToCredit = false;
1222112217
break;
1222212218
case GOSSIP_OPTION_QUESTGIVER:
1222312219
hasMenuItem = false;
@@ -12325,12 +12321,6 @@ void Player::PrepareGossipMenu(WorldObject* pSource, uint32 menuId)
1232512321
if (canSeeQuests)
1232612322
PrepareQuestMenu(pSource->GetObjectGuid());
1232712323

12328-
if (canTalkToCredit)
12329-
{
12330-
if (pSource->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP) && !(((Creature*)pSource)->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_NO_TALKTO_CREDIT))
12331-
TalkedToCreature(pSource->GetEntry(), pSource->GetObjectGuid());
12332-
}
12333-
1233412324
// some gossips aren't handled in normal way ... so we need to do it this way .. TODO: handle it in normal way ;-)
1233512325
/*if (pMenu->Empty())
1233612326
{

src/shared/revision_nr.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#ifndef __REVISION_NR_H__
22
#define __REVISION_NR_H__
3-
#define REVISION_NR "1825"
3+
#define REVISION_NR "1826"
44
#endif // __REVISION_NR_H__

src/shared/revision_sql.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#ifndef __REVISION_SQL_H__
22
#define __REVISION_SQL_H__
33
#define REVISION_DB_CHARACTERS "required_"
4-
#define REVISION_DB_MANGOS "required_s1825_12278_01_mangos_creature_template"
4+
#define REVISION_DB_MANGOS "required_s1826_12279_01_mangos_creature_template"
55
#define REVISION_DB_REALMD "required_"
66
#endif // __REVISION_SQL_H__

0 commit comments

Comments
 (0)