ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/apply.C
(Generate patch)

Comparing deliantra/server/server/apply.C (file contents):
Revision 1.111 by root, Sun Jul 1 05:00:19 2007 UTC vs.
Revision 1.113 by root, Tue Jul 10 05:51:38 2007 UTC

1551 if (QUERY_FLAG (op, FLAG_BLIND) && !QUERY_FLAG (op, FLAG_WIZ)) 1551 if (QUERY_FLAG (op, FLAG_BLIND) && !QUERY_FLAG (op, FLAG_WIZ))
1552 { 1552 {
1553 new_draw_info (NDI_UNIQUE, 0, op, "You are unable to read while blind."); 1553 new_draw_info (NDI_UNIQUE, 0, op, "You are unable to read while blind.");
1554 return; 1554 return;
1555 } 1555 }
1556
1556 if (tmp->msg == NULL) 1557 if (!tmp->msg)
1557 { 1558 {
1558 new_draw_info_format (NDI_UNIQUE, 0, op, "You open the %s and find it empty.", &tmp->name); 1559 new_draw_info_format (NDI_UNIQUE, 0, op, "You open the %s and find it empty.", &tmp->name);
1559 return; 1560 return;
1560 } 1561 }
1561 1562
1564 if (!skill_ob) 1565 if (!skill_ob)
1565 { 1566 {
1566 new_draw_info (NDI_UNIQUE, 0, op, "You are unable to decipher the strange symbols."); 1567 new_draw_info (NDI_UNIQUE, 0, op, "You are unable to decipher the strange symbols.");
1567 return; 1568 return;
1568 } 1569 }
1570
1569 lev_diff = tmp->level - (skill_ob->level + 5); 1571 lev_diff = tmp->level - (skill_ob->level + 5);
1570 if (!QUERY_FLAG (op, FLAG_WIZ) && lev_diff > 0) 1572 if (!QUERY_FLAG (op, FLAG_WIZ) && lev_diff > 0)
1571 { 1573 {
1572 if (lev_diff < 2) 1574 if (lev_diff < 2)
1573 new_draw_info (NDI_UNIQUE, 0, op, "This book is just barely beyond your comprehension."); 1575 new_draw_info (NDI_UNIQUE, 0, op, "This book is just barely beyond your comprehension.");
1584 return; 1586 return;
1585 } 1587 }
1586 1588
1587 readable_message_type *msgType = get_readable_message_type (tmp); 1589 readable_message_type *msgType = get_readable_message_type (tmp);
1588 1590
1591 if (player *pl = op->contr)
1592 if (client *ns = pl->ns)
1593 if (ns->can_msg)
1594 {
1595 dynbuf_text buf;
1596 buf << long_desc (tmp, op)
1597 << "\n\n"
1598 << tmp->msg
1599 << '\0';
1600 ns->send_msg (NDI_NAVY, msgType->msgtype, buf.linearise ());
1601 }
1602 else
1589 draw_ext_info_format (NDI_UNIQUE | NDI_NAVY, 0, op, 1603 draw_ext_info_format (NDI_UNIQUE | NDI_NAVY, 0, op,
1590 msgType->message_type, msgType->message_subtype, 1604 msgType->message_type, msgType->message_subtype,
1591 "You open the %s and start reading.\n%s", (char *)"%s\n%s", 1605 "You open the %s and start reading.\n%s", (char *)"%s\n%s",
1592 long_desc (tmp, op), &tmp->msg); 1606 long_desc (tmp, op), &tmp->msg);
1593 1607
1594 /* gain xp from reading */ 1608 /* gain xp from reading */
1595 if (!QUERY_FLAG (tmp, FLAG_NO_SKILL_IDENT)) 1609 if (!QUERY_FLAG (tmp, FLAG_NO_SKILL_IDENT))
1596 { /* only if not read before */ 1610 { /* only if not read before */
1597 int exp_gain = calc_skill_exp (op, tmp, skill_ob); 1611 int exp_gain = calc_skill_exp (op, tmp, skill_ob);
2033 if (meal->type != FLESH || !is_dragon_pl (op)) 2047 if (meal->type != FLESH || !is_dragon_pl (op))
2034 return 0; 2048 return 0;
2035 2049
2036 /* now grab the 'dragon_skin'- and 'dragon_ability'-forces 2050 /* now grab the 'dragon_skin'- and 'dragon_ability'-forces
2037 from the player's inventory */ 2051 from the player's inventory */
2038 shstr_cmp dragon_ability_force ("dragon_ability_force");
2039 shstr_cmp dragon_skin_force ("dragon_skin_force");
2040
2041 for (tmp = op->inv; tmp; tmp = tmp->below) 2052 for (tmp = op->inv; tmp; tmp = tmp->below)
2042 if (tmp->type == FORCE) 2053 if (tmp->type == FORCE)
2043 if (tmp->arch->archname == dragon_skin_force) 2054 if (tmp->arch->archname == shstr_dragon_skin_force)
2044 skin = tmp; 2055 skin = tmp;
2045 else if (tmp->arch->archname == dragon_ability_force) 2056 else if (tmp->arch->archname == shstr_dragon_ability_force)
2046 abil = tmp; 2057 abil = tmp;
2047 2058
2048 /* if either skin or ability are missing, this is an old player 2059 /* if either skin or ability are missing, this is an old player
2049 which is not to be considered a dragon -> bail out */ 2060 which is not to be considered a dragon -> bail out */
2050 if (skin == NULL || abil == NULL) 2061 if (skin == NULL || abil == NULL)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines