[Crossfire-wiki] [Crossfire DokuWiki] page changed: parties
no-reply_wiki at metalforge.org
no-reply_wiki at metalforge.org
Thu Nov 7 02:13:09 CST 2013
A page in your DokuWiki was added or changed. Here are the details:
Date : 2013/11/07 02:13
User : saru
Edit Summary: removed
@@ -1,37 +1 @@
- ====== Party Play ======
- Characters in crossfire can form 'parties' which enables them to work towards common goals. Whilst in the same party, characters will share experience.
- This is defined as
-
- void share_exp(object *op, sint64 exp, const char *skill, int flag) {
- int shares = 0, count = 0;
- player *pl;
- partylist *party;
-
- if (op->type != PLAYER || op->contr->party == NULL) {
- change_exp(op, exp, skill, 0);
- return;
- }
-
- party = op->contr->party;
-
- for (pl = first_player; pl != NULL; pl = pl->next) {
- if (party && pl->ob->contr->party == party && on_same_map(pl->ob, op)) {
- count++;
- shares += (pl->ob->level+4);
- }
- }
- if (count == 1 || shares > exp)
- change_exp(op, exp, skill, flag);
- else {
- sint64 share = exp/shares, given = 0, nexp;
- for (pl = first_player; pl != NULL; pl = pl->next) {
- if (party && pl->ob->contr->party == party && on_same_map(pl->ob, op)) {
- nexp = (pl->ob->level+4)*share;
- change_exp(pl->ob, nexp, skill, SK_EXP_TOTAL);
- given += nexp;
- }
- }
- exp -= given;
- /* give any remainder to the player */
- change_exp(op, exp, skill, flag);
IP-Address : 59.167.121.117
Old Revision: http://wiki.metalforge.net/doku.php/parties?rev=1383742139
New Revision: http://wiki.metalforge.net/doku.php/parties
--
This mail was generated by DokuWiki at
http://wiki.metalforge.net/
More information about the crossfire-wiki
mailing list