Fixed bug #13257: Attack dialog always uses the active name of a weapon special
This commit is contained in:
parent
c138f765b3
commit
b10aad9faa
3 changed files with 8 additions and 5 deletions
|
@ -25,6 +25,9 @@ Version 1.7.0-svn:
|
|||
via floating popups on the specified hex
|
||||
* Added run_file FormulaAI function to allow running .fai scripts directly
|
||||
from in-game console
|
||||
* User interface:
|
||||
* Fixed bug #13257: Attack dialog always uses the active name of a weapon
|
||||
special
|
||||
* WML Engine:
|
||||
* Added [show_objectives] tag (part of bug #13042)
|
||||
* Made moveto events set $x2,$y2 to the source hex. (bug #13140)
|
||||
|
|
|
@ -637,7 +637,7 @@ std::string attack_type::weapon_specials(bool force) const
|
|||
i_end = list_map.end(); i != i_end; ++i) {
|
||||
for (config::child_list::const_iterator j = i->second.begin(),
|
||||
j_end = i->second.end(); j != j_end; ++j) {
|
||||
char const *s = (force || special_active(**j, true, true))
|
||||
char const *s = (force || special_active(**j, true))
|
||||
? "name" : "name_inactive";
|
||||
std::string const &name = (**j)[s];
|
||||
|
||||
|
@ -658,7 +658,7 @@ std::string attack_type::weapon_specials(bool force) const
|
|||
* cfg: a weapon special WML structure
|
||||
*
|
||||
*/
|
||||
bool attack_type::special_active(const config& cfg,bool self,bool report) const
|
||||
bool attack_type::special_active(const config& cfg, bool self) const
|
||||
{
|
||||
// log_scope("special_active");
|
||||
assert(unitmap_ != NULL);
|
||||
|
@ -676,7 +676,7 @@ bool attack_type::special_active(const config& cfg,bool self,bool report) const
|
|||
}
|
||||
|
||||
if(attacker_) {
|
||||
if (!report) {
|
||||
{
|
||||
std::string const &active = cfg["active_on"];
|
||||
if (!active.empty() && active != "offense")
|
||||
return false;
|
||||
|
@ -701,7 +701,7 @@ bool attack_type::special_active(const config& cfg,bool self,bool report) const
|
|||
}
|
||||
}
|
||||
} else {
|
||||
if (!report) {
|
||||
{
|
||||
std::string const &active = cfg["active_on"];
|
||||
if (!active.empty() && active != "defense")
|
||||
return false;
|
||||
|
|
|
@ -82,7 +82,7 @@ public:
|
|||
/*
|
||||
* cfg: a weapon special WML structure
|
||||
*/
|
||||
bool special_active(const config& cfg,bool self,bool report=false) const;
|
||||
bool special_active(const config& cfg, bool self) const;
|
||||
bool special_affects_opponent(const config& cfg) const;
|
||||
bool special_affects_self(const config& cfg) const;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue